Clojure: documentation -


i working through tutorial: http://moxleystratton.com/clojure/clojure-tutorial-for-the-non-lisp-programmer

and came across snippet:

user=> (loop [i 0]   (when (< 5)     (println "i:" i)     (recur (inc i)))) i: 0 i: 1 i: 2 i: 3 i: 4 nil 

works great on interpreter!

❯ lein repl nrepl server started on port 50974 repl-y 0.1.10 clojure 1.5.1 

now looking documentation on recur is.

it's not in here! http://clojure.github.io/clojure/api-index.html

it took me while figure out it's "special form" , described in this page.

is there compilation out there has single coherent index?

try using built in documentation in repl:

user=> (doc recur) ------------------------- recur   (recur exprs*) special form   evaluates exprs in order, then, in parallel, rebinds   bindings of recursion point values of exprs.   execution jumps recursion point, loop or fn method.    please see http://clojure.org/special_forms#recur 

it works on functions, macros, special forms, variables—almost everything.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -