Skip to content
Browse files

Update latest ClojureDocs.org snapshot to December 31, 2012

  • Loading branch information...
1 parent a6818a0 commit 40694c5ee749fb4018f6f15d930484ed57bd13da @jafingerhut committed
Showing with 261 additions and 21 deletions.
  1. +261 −21 snapshots/clojuredocs-snapshot-latest.txt
View
282 snapshots/clojuredocs-snapshot-latest.txt
@@ -1,4 +1,4 @@
-{:snapshot-time "Fri Dec 07 13:20:15 PST 2012",
+{:snapshot-time "Mon Dec 31 15:00:10 PST 2012",
:snapshot-info
{"clojure.zip/insert-right"
{:comments [],
@@ -6150,7 +6150,18 @@
:lib_version "1.3.0",
:library_id 15,
:body
- ";; N.B. this example holds onto the head of a lazy seq which should generally be avoided\n(def fib-seq\n (lazy-cat [0 1] (map + (rest fib-seq) fib-seq)))\n\n(take 10 fib-seq)"}],
+ ";; N.B. this example holds onto the head of a lazy seq which should generally be avoided\n(def fib-seq\n (lazy-cat [0 1] (map + (rest fib-seq) fib-seq)))\n\n(take 10 fib-seq)"}
+ {:namespace_id 330,
+ :ns "clojure.core",
+ :updated_at "2012-12-14 14:55:23.0",
+ :function "lazy-cat",
+ :version 3,
+ :created_at "2012-12-14 14:25:10.0",
+ :library "Clojure Core",
+ :lib_version "1.3.0",
+ :library_id 15,
+ :body
+ ";; When the producer function produces a collection, not an element,\n;; lazy-cat is usable.\nuser=> (defn n-repeat [n] (lazy-cat (repeat n n) (n-repeat (inc n))))\n#'user/n-repeat\n\nuser=> (take 6 (j 1))\n(1 2 2 3 3 3)\n\nuser=> (take 12 (j 1))\n(1 2 2 3 3 3 4 4 4 4 5 5)\n"}],
:id 5578,
:name "lazy-cat",
:ns "clojure.core",
@@ -6678,7 +6689,18 @@
:library "Clojure Core",
:library_id 3,
:body
- "On juergenhoetzel's comment:\n\nAll the examples could be re-written in some combination of map and filter, but they are still valid examples of using the for comprehension, AFAIK:\n\nExamples:\n<pre>user=&gt; (mapcat (fn [e] (map (fn [x] (* x e)) [1 2 3])) [1 2 3])\n(1 2 3 2 4 6 3 6 9)\nuser=&gt; (mapcat (fn [e] (map (fn [x] [e x]) [1 2 3])) ['a 'b 'c])\n([a 1] [a 2] [a 3] [b 1] [b 2] [b 3] [c 1] [c 2] [c 3])\nuser=&gt; (map (fn [e] [e (* e e)(* e e e)]) (range 1 6))\n([1 1 1] [2 4 8] [3 9 27] [4 16 64] [5 25 125])\nuser=&gt; (map (fn [e] (* e e)) (range 3 7))\n(9 16 25 36)\nuser=&gt; (map first (filter (fn [[x y]] (= y 0)) '([:a 1] [:b 2] [:c 0])))\n(:c)\nuser=&gt;\n</pre>\n\n"}],
+ "On juergenhoetzel's comment:\n\nAll the examples could be re-written in some combination of map and filter, but they are still valid examples of using the for comprehension, AFAIK:\n\nExamples:\n<pre>user=&gt; (mapcat (fn [e] (map (fn [x] (* x e)) [1 2 3])) [1 2 3])\n(1 2 3 2 4 6 3 6 9)\nuser=&gt; (mapcat (fn [e] (map (fn [x] [e x]) [1 2 3])) ['a 'b 'c])\n([a 1] [a 2] [a 3] [b 1] [b 2] [b 3] [c 1] [c 2] [c 3])\nuser=&gt; (map (fn [e] [e (* e e)(* e e e)]) (range 1 6))\n([1 1 1] [2 4 8] [3 9 27] [4 16 64] [5 25 125])\nuser=&gt; (map (fn [e] (* e e)) (range 3 7))\n(9 16 25 36)\nuser=&gt; (map first (filter (fn [[x y]] (= y 0)) '([:a 1] [:b 2] [:c 0])))\n(:c)\nuser=&gt;\n</pre>\n\n"}
+ {:namespace_id 330,
+ :ns "clojure.core",
+ :updated_at "2012-12-26 12:28:12.0",
+ :user_id 799,
+ :function "for",
+ :version "1.3.0",
+ :created_at "2012-12-26 12:25:40.0",
+ :library "Clojure Core",
+ :library_id 15,
+ :body
+ "Take careful note of the description's wording:\n\n binding-form/collection-expr pairs, \n each followed by zero or more modifiers\n\nA consequence is that the binding list may *not* begin with a modifier, i.e a `:let`, `:when` or `:while`!\n\nThe following example is **illegal** syntax:\n\n (for [:let [a 1] b (range 5)] \n {a b})\n\nWhile it might sometimes be convenient to start a `for` with a `:let` to reduce code clutter, the \"correct\" procedure is to nest the `for` in a \"proper\" `let`, like this:\n\n (let [a 1]\n (for [b (range 5)] \n {a b}))\n\nSimilarly, a `:when` is better represented by nesting in an `if`.\n\n"}],
:see-alsos
[{:namespace_id 99,
:weight 5,
@@ -6813,7 +6835,18 @@
:lib_version "1.3.0",
:library_id 15,
:body
- ";; Here are a couple of examples where the only difference is where\n;; the :while is placed, but it makes a significant difference in the\n;; behavior.\n\n;; When x=2 y=1 is reached, :while (<= x y) evaluates false, so all\n;; further items in the y collection are skipped. When x=3 y=1 is\n;; reached, the same thing happens.\n\nuser=> (for [x [1 2 3]\n y [1 2 3]\n :while (<= x y)\n z [1 2 3]]\n [x y z])\n([1 1 1] [1 1 2] [1 1 3]\n [1 2 1] [1 2 2] [1 2 3]\n [1 3 1] [1 3 2] [1 3 3])\n\n;; This is different. When x=2 y=1 z=1 is reached, :while (<= x y)\n;; evaluates false, but since the :while is after the binding for z,\n;; all further items in the z collection are skipped. Then x=2 y=2\n;; z=1 is tried, where the while expresssion evaluates true.\n\nuser=> (for [x [1 2 3]\n y [1 2 3]\n z [1 2 3]\n :while (<= x y)]\n [x y z])\n([1 1 1] [1 1 2] [1 1 3]\n [1 2 1] [1 2 2] [1 2 3]\n [1 3 1] [1 3 2] [1 3 3]\n [2 2 1] [2 2 2] [2 2 3]\n [2 3 1] [2 3 2] [2 3 3]\n [3 3 1] [3 3 2] [3 3 3])\n"}],
+ ";; Here are a couple of examples where the only difference is where\n;; the :while is placed, but it makes a significant difference in the\n;; behavior.\n\n;; When x=2 y=1 is reached, :while (<= x y) evaluates false, so all\n;; further items in the y collection are skipped. When x=3 y=1 is\n;; reached, the same thing happens.\n\nuser=> (for [x [1 2 3]\n y [1 2 3]\n :while (<= x y)\n z [1 2 3]]\n [x y z])\n([1 1 1] [1 1 2] [1 1 3]\n [1 2 1] [1 2 2] [1 2 3]\n [1 3 1] [1 3 2] [1 3 3])\n\n;; This is different. When x=2 y=1 z=1 is reached, :while (<= x y)\n;; evaluates false, but since the :while is after the binding for z,\n;; all further items in the z collection are skipped. Then x=2 y=2\n;; z=1 is tried, where the while expresssion evaluates true.\n\nuser=> (for [x [1 2 3]\n y [1 2 3]\n z [1 2 3]\n :while (<= x y)]\n [x y z])\n([1 1 1] [1 1 2] [1 1 3]\n [1 2 1] [1 2 2] [1 2 3]\n [1 3 1] [1 3 2] [1 3 3]\n [2 2 1] [2 2 2] [2 2 3]\n [2 3 1] [2 3 2] [2 3 3]\n [3 3 1] [3 3 2] [3 3 3])\n"}
+ {:namespace_id 330,
+ :ns "clojure.core",
+ :updated_at "2012-12-27 15:34:52.0",
+ :function "for",
+ :version 1,
+ :created_at "2012-12-27 15:34:52.0",
+ :library "Clojure Core",
+ :lib_version "1.3.0",
+ :library_id 15,
+ :body
+ "(defn all-files-present?\n\"Takes a list of real file names, and returns a map of files present 1\nand not present 0.\"\n[file-seq]\n(for [fnam file-seq\n :let [stat-map {(keyword fnam) (look-for fnam \"f\")}]]\n stat-map))\n\n(into {} (all-files-present? '(\"Makefile\" \"build.sh\" \"real-estate.csv\")))\n\n{:Makefile 1, :build.sh 1, :real-estate.csv 0}"}],
:id 5522,
:name "for",
:ns "clojure.core",
@@ -7200,7 +7233,18 @@
:lib_version "1.3.0",
:library_id 15,
:body
- ";; Using a reified FileFilter implementation to obtain only directory files\n(.listFiles (java.io.File. \".\")\n (reify\n java.io.FileFilter\n (accept [this f]\n (.isDirectory f))))\n"}],
+ ";; Using a reified FileFilter implementation to obtain only directory files\n(.listFiles (java.io.File. \".\")\n (reify\n java.io.FileFilter\n (accept [this f]\n (.isDirectory f))))\n"}
+ {:namespace_id 330,
+ :ns "clojure.core",
+ :updated_at "2012-12-17 16:02:10.0",
+ :function "reify",
+ :version 1,
+ :created_at "2012-12-17 16:02:10.0",
+ :library "Clojure Core",
+ :lib_version "1.3.0",
+ :library_id 15,
+ :body
+ ";;;; This example shows how to reify a multi-arity protocol function\n;;;; (note the different style in defprotocol vs reify)\n\n;; define a multi-arity protocol function blah\n(defprotocol Foo\n (blah\n [this x]\n [this x y]))\n\n;; define an anonymous extension via reify\n(def r (reify Foo \n (blah [_ x] x)\n (blah [_ x y] y)))\n\n;; invoke blah via the r instance\n(blah r 1) ;; => 1\n(blah r 1 2) ;; => 2\n\n\n"}],
:id 5715,
:name "reify",
:ns "clojure.core",
@@ -7962,15 +8006,15 @@
:examples
[{:namespace_id 99,
:ns "clojure.core",
- :updated_at "2012-07-23 14:24:09.0",
+ :updated_at "2012-12-28 05:00:31.0",
:function "instance?",
- :version 4,
+ :version 5,
:created_at "2010-08-20 00:35:26.0",
:library "Clojure Core",
:lib_version "1.2.0",
:library_id 3,
:body
- "user=> (instance? Integer 1)\ntrue\nuser=> (instance? Number 1)\ntrue\nuser=> (instance? String 1)\nfalse\nuser=> (instance? String \"1\")\ntrue"}
+ "user=> (instance? Long 1)\ntrue\nuser=> (instance? Integer 1)\nfalse\nuser=> (instance? Number 1)\ntrue\nuser=> (instance? String 1)\nfalse\nuser=> (instance? String \"1\")\ntrue"}
{:namespace_id 99,
:ns "clojure.core",
:updated_at "2011-08-21 22:07:55.0",
@@ -11048,7 +11092,19 @@
:line "178",
:arglists_comp "[obj]",
:url_friendly_name "meta",
- :file "clojure/core.clj"}],
+ :file "clojure/core.clj"}
+ {:namespace_id 115,
+ :weight 2,
+ :name "deftest",
+ :updated_at "2010-11-08 23:37:15.0",
+ :version "1.2.0",
+ :created_at "2010-07-14 20:28:06.0",
+ :added nil,
+ :url "http://clojuredocs.org/v/2495",
+ :line "593",
+ :arglists_comp "[name & body]",
+ :url_friendly_name "deftest",
+ :file "clojure/test.clj"}],
:examples
[{:namespace_id 115,
:ns "clojure.test",
@@ -17607,7 +17663,18 @@
:lib_version "1.2.0",
:library_id 3,
:body
- ";; you can use every? with a set as the predicate to return true if \n;; every member of a collection is in the set\nuser=> (every? #{1 2} [1 2 3])\nfalse\nuser=> (every? #{1 2} [1 2])\ntrue\n\n;; or use a hash-map as the predicate with every? to returns true \n;; if every member of a collection is a key within the map\nuser=> (every? {1 \"one\" 2 \"two\"} [1 2])\ntrue\nuser=> (every? {1 \"one\" 2 \"two\"} [1 2 3])\nfalse"}],
+ ";; you can use every? with a set as the predicate to return true if \n;; every member of a collection is in the set\nuser=> (every? #{1 2} [1 2 3])\nfalse\nuser=> (every? #{1 2} [1 2])\ntrue\n\n;; or use a hash-map as the predicate with every? to returns true \n;; if every member of a collection is a key within the map\nuser=> (every? {1 \"one\" 2 \"two\"} [1 2])\ntrue\nuser=> (every? {1 \"one\" 2 \"two\"} [1 2 3])\nfalse"}
+ {:namespace_id 330,
+ :ns "clojure.core",
+ :updated_at "2012-12-26 18:25:45.0",
+ :function "every?",
+ :version 2,
+ :created_at "2012-12-26 18:24:44.0",
+ :library "Clojure Core",
+ :lib_version "1.3.0",
+ :library_id 15,
+ :body
+ ";; this is kind of weird IMO... but it works that way (the same for vectors)\nuser=> (every? true? '())\ntrue\nuser=> (every? false? '())\ntrue"}],
:id 5495,
:name "every?",
:ns "clojure.core",
@@ -19243,7 +19310,19 @@
:line nil,
:arglists_comp "[name]",
:url_friendly_name "in-ns",
- :file nil}],
+ :file nil}
+ {:namespace_id 99,
+ :weight 1,
+ :name "remove-ns",
+ :updated_at "2010-10-20 04:42:06.0",
+ :version "1.2.0",
+ :created_at "2010-07-14 20:21:33.0",
+ :added nil,
+ :url "http://clojuredocs.org/v/1687",
+ :line "3189",
+ :arglists_comp "[sym]",
+ :url_friendly_name "remove-ns",
+ :file "clojure/core.clj"}],
:examples
[{:namespace_id 99,
:ns "clojure.core",
@@ -25866,7 +25945,18 @@
:ns "circumspec.report.nested",
:url "http://clojuredocs.org/v/3708"},
"clojure.contrib.str-utils2/partial"
- {:comments [],
+ {:comments
+ [{:namespace_id 86,
+ :ns "clojure.contrib.str-utils2",
+ :updated_at "2012-12-13 04:07:47.0",
+ :user_id 794,
+ :function "partial",
+ :version "1.2.0",
+ :created_at "2012-12-13 04:07:47.0",
+ :library "Clojure Contrib",
+ :library_id 1,
+ :body
+ "Where has this gone in the new modular contrib libraries?\n"}],
:see-alsos
[{:namespace_id 99,
:weight 3,
@@ -26982,6 +27072,18 @@
:line "2172",
:arglists_comp "[n coll]",
:url_friendly_name "drop",
+ :file "clojure/core.clj"}
+ {:namespace_id 330,
+ :weight 1,
+ :name "nthrest",
+ :updated_at "2012-06-04 06:36:54.0",
+ :version "1.3.0",
+ :created_at "2011-09-26 06:08:31.0",
+ :added "1.3",
+ :url "http://clojuredocs.org/v/5644",
+ :line "2755",
+ :arglists_comp "[coll n]",
+ :url_friendly_name "nthrest",
:file "clojure/core.clj"}],
:examples
[{:namespace_id 99,
@@ -28912,8 +29014,55 @@
:ns "clojure.java.io",
:url "http://clojuredocs.org/v/5880"},
"clojure.core/nthrest"
- {:comments [],
- :see-alsos [],
+ {:comments
+ [{:namespace_id 330,
+ :ns "clojure.core",
+ :updated_at "2012-12-21 03:20:40.0",
+ :user_id 61,
+ :function "nthrest",
+ :version "1.3.0",
+ :created_at "2012-12-21 03:13:01.0",
+ :library "Clojure Core",
+ :library_id 15,
+ :body
+ "This differs from clojure.core/drop in that it immediately drops the head of the seq, instead of doing so on the first call to first or seq."}],
+ :see-alsos
+ [{:namespace_id 99,
+ :weight 1,
+ :name "drop",
+ :updated_at "2010-10-20 04:42:13.0",
+ :version "1.2.0",
+ :created_at "2010-07-14 20:25:20.0",
+ :added nil,
+ :url "http://clojuredocs.org/v/2018",
+ :line "2172",
+ :arglists_comp "[n coll]",
+ :url_friendly_name "drop",
+ :file "clojure/core.clj"}
+ {:namespace_id 99,
+ :weight 1,
+ :name "nthnext",
+ :updated_at "2010-10-20 04:42:13.0",
+ :version "1.2.0",
+ :created_at "2010-07-14 20:25:11.0",
+ :added nil,
+ :url "http://clojuredocs.org/v/2006",
+ :line "3393",
+ :arglists_comp "[coll n]",
+ :url_friendly_name "nthnext",
+ :file "clojure/core.clj"}
+ {:namespace_id 99,
+ :weight 1,
+ :name "nth",
+ :updated_at "2010-10-20 04:42:09.0",
+ :version "1.2.0",
+ :created_at "2010-07-14 20:23:26.0",
+ :added nil,
+ :url "http://clojuredocs.org/v/1851",
+ :line "740",
+ :arglists_comp "[coll index]|[coll index not-found]",
+ :url_friendly_name "nth",
+ :file "clojure/core.clj"}],
:examples
[{:namespace_id 330,
:ns "clojure.core",
@@ -35495,6 +35644,18 @@
:line "3393",
:arglists_comp "[coll n]",
:url_friendly_name "nthnext",
+ :file "clojure/core.clj"}
+ {:namespace_id 330,
+ :weight 1,
+ :name "nthrest",
+ :updated_at "2012-06-04 06:36:54.0",
+ :version "1.3.0",
+ :created_at "2011-09-26 06:08:31.0",
+ :added "1.3",
+ :url "http://clojuredocs.org/v/5644",
+ :line "2755",
+ :arglists_comp "[coll n]",
+ :url_friendly_name "nthrest",
:file "clojure/core.clj"}],
:examples
[{:namespace_id 99,
@@ -40426,7 +40587,18 @@
:ns "swank.loader",
:url "http://clojuredocs.org/v/4291"},
"clojure.contrib.combinatorics/selections"
- {:comments [],
+ {:comments
+ [{:namespace_id 327,
+ :ns "clojure.contrib.combinatorics",
+ :updated_at "2012-12-11 22:58:18.0",
+ :user_id 735,
+ :function "selections",
+ :version "1.2.0",
+ :created_at "2012-12-11 22:58:18.0",
+ :library "Clojure Contrib",
+ :library_id 1,
+ :body
+ "This is also useful for getting non-unique permutations. The standard permutations function will not repeat elements, but this will. This comes in handy for certain situations. "}],
:see-alsos [],
:examples
[{:namespace_id 327,
@@ -44160,7 +44332,18 @@
:lib_version "1.3.0",
:library_id 15,
:body
- ";; See also http://clojure.org/namespaces for information on namespaces in Clojure and how to inspect and manipulate them"}],
+ ";; See also http://clojure.org/namespaces for information on namespaces in Clojure and how to inspect and manipulate them"}
+ {:namespace_id 330,
+ :ns "clojure.core",
+ :updated_at "2012-12-28 05:54:24.0",
+ :function "ns-map",
+ :version 1,
+ :created_at "2012-12-28 05:54:24.0",
+ :library "Clojure Core",
+ :lib_version "1.3.0",
+ :library_id 15,
+ :body
+ ";; ns-map = ns-refers + ns-interns + ns-imports\nuser=> (count (ns-imports *ns*))\n;;=> 96\n\nuser=> (count (ns-interns *ns*))\n;;=> 2\n\nuser=> (count (ns-refers *ns*))\n;;=> 590\n\nuser=> (+ *1 *2 *3)\n;;=> 688\n\nuser=> (count (ns-map *ns*))\n;;=> 688"}],
:id 5635,
:name "ns-map",
:ns "clojure.core",
@@ -46283,6 +46466,30 @@
:line "131",
:arglists_comp "[x]",
:url_friendly_name "seq_q",
+ :file "clojure/core.clj"}
+ {:namespace_id 99,
+ :weight 1,
+ :name "sequential?",
+ :updated_at "2010-10-20 04:42:03.0",
+ :version "1.2.0",
+ :created_at "2010-07-14 20:19:33.0",
+ :added nil,
+ :url "http://clojuredocs.org/v/1522",
+ :line "5000",
+ :arglists_comp "[coll]",
+ :url_friendly_name "sequential_q",
+ :file "clojure/core.clj"}
+ {:namespace_id 99,
+ :weight 2,
+ :name "coll?",
+ :updated_at "2010-11-20 10:40:21.0",
+ :version "1.2.0",
+ :created_at "2010-07-14 20:25:59.0",
+ :added nil,
+ :url "http://clojuredocs.org/v/2074",
+ :line "4968",
+ :arglists_comp "[x]",
+ :url_friendly_name "coll_q",
:file "clojure/core.clj"}],
:examples
[{:namespace_id 99,
@@ -46982,7 +47189,18 @@
:lib_version "1.2.0",
:library_id 1,
:body
- "(into [5 6 7 8] '(1 2 3 4))\n==> [5 6 7 8 1 2 3 4] \n(into #{5 6 7 8} [1 2 3 4])\n==> #{1 2 3 4 5 6 7 8} \n(into [[5 6] [7 8]] #{[1 2] [3 4]})\n==> [[5 6] [7 8] [3 4] [1 2]] \n(into #{{5 6} {7 8}} [{1 2} {3 4}])\n ==> #{{5 6} {1 2} {3 4} {7 8}} "}],
+ "(into [5 6 7 8] '(1 2 3 4))\n==> [5 6 7 8 1 2 3 4] \n(into #{5 6 7 8} [1 2 3 4])\n==> #{1 2 3 4 5 6 7 8} \n(into [[5 6] [7 8]] #{[1 2] [3 4]})\n==> [[5 6] [7 8] [3 4] [1 2]] \n(into #{{5 6} {7 8}} [{1 2} {3 4}])\n ==> #{{5 6} {1 2} {3 4} {7 8}} "}
+ {:namespace_id 31,
+ :ns "clojure.contrib.generic.collection",
+ :updated_at "2012-12-27 15:51:47.0",
+ :function "into",
+ :version 1,
+ :created_at "2012-12-27 15:51:47.0",
+ :library "Clojure Contrib",
+ :lib_version "1.2.0",
+ :library_id 1,
+ :body
+ "(defn all-files-present?\n\"Takes a list of real file names, and returns a sequence of maps \n indicating the file name and its availability status 1 for \n present and 0 for not present.\"\n [file-seq]\n (for [fnam file-seq\n :let [stat-map {(keyword fnam) (if (= (look-for fnam \"f\") 0)\n 1\n 0)}]]\n stat-map))\n\n(into {} (all-files-present? '(\"Makefile\" \"build.sh\" \"real-estate.csv\")) )\n{:Makefile 1, :build.sh 1, :real-estate.csv 0}\n\n"}],
:id 395,
:name "into",
:ns "clojure.contrib.generic.collection",
@@ -49876,15 +50094,26 @@
:examples
[{:namespace_id 99,
:ns "clojure.core",
- :updated_at "2010-09-26 04:21:46.0",
+ :updated_at "2012-12-28 18:46:07.0",
:function "add-watch",
- :version 4,
+ :version 5,
:created_at "2010-07-17 11:11:00.0",
:library "Clojure Core",
:lib_version "1.2.0",
:library_id 3,
:body
- ";; Add useful context to watcher function:\n(defn watch-agent [_agent context]\n (let [watch-fn (fn [_context _ref _key old-value new-value] ;...\n )] \n (add-watch _agent nil (partial watch-fn context))))\n"}],
+ ";; Add useful context to watcher function:\n(defn watch-agent [_agent context]\n (let [watch-fn (fn [_context _key _ref old-value new-value] ;...\n )] \n (add-watch _agent nil (partial watch-fn context))))\n"}
+ {:namespace_id 330,
+ :ns "clojure.core",
+ :updated_at "2012-12-28 18:56:41.0",
+ :function "add-watch",
+ :version 2,
+ :created_at "2012-12-28 18:52:23.0",
+ :library "Clojure Core",
+ :lib_version "1.3.0",
+ :library_id 15,
+ :body
+ ";; timing of agent actions and watches using nrepl (ymmv)\nuser> (def a (agent 0))\n#'user/a\nuser> a\n#<Agent@2bd9c3e7: 0>\nuser> (add-watch a :key (fn [k r os ns] (print k r os ns)))\n#<Agent@2bd9c3e7: 0>\nuser> (send a inc)\n#<Agent@2bd9c3e7: 0>\nuser> (send a inc)\n:key #<Agent@2bd9c3e7: 1> 0 1\n#<Agent@2bd9c3e7: 1>\nuser> a\n:key #<Agent@2bd9c3e7: 2> 1 2\n#<Agent@2bd9c3e7: 2>\n"}],
:id 5339,
:name "add-watch",
:ns "clojure.core",
@@ -51075,7 +51304,18 @@
:lib_version "1.3.0",
:library_id 15,
:body
- "user=> (use 'clojure.walk)\nuser=> (macroexpand-all '(-> c (+ 3) (* 2)))\n(* (+ c 3) 2)"}],
+ "user=> (use 'clojure.walk)\nuser=> (macroexpand-all '(-> c (+ 3) (* 2)))\n(* (+ c 3) 2)"}
+ {:namespace_id 350,
+ :ns "clojure.walk",
+ :updated_at "2012-12-10 15:16:32.0",
+ :function "macroexpand-all",
+ :version 1,
+ :created_at "2012-12-10 15:16:32.0",
+ :library "Clojure Core",
+ :lib_version "1.3.0",
+ :library_id 15,
+ :body
+ "user=> (use 'clojure.walk)\n\n; tryclj.com and lazybot on #clojure get the following wrong\nuser=> (let [-> inc] (-> 5)) \n6\n\n; Below macroexpansion is supposed to result in equivalent code to the above\nuser=> (macroexpand-all '(let [-> inc] (-> 5)))\n(let* [-> inc] 5)\nuser=> (let* [-> inc] 5)\n5\n\n; However, as is clear above, it does not"}],
:id 6075,
:name "macroexpand-all",
:ns "clojure.walk",

0 comments on commit 40694c5

Please sign in to comment.
Something went wrong with that request. Please try again.