Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update latest snapshot to Apr 15 2012

  • Loading branch information...
commit f13de7e32cd468229df40bce1ae054abf23dccb6 1 parent e62065c
Andy Fingerhut authored April 15, 2012

Showing 1 changed file with 360 additions and 26 deletions. Show diff stats Hide diff stats

  1. 386  snapshots/clojuredocs-snapshot-latest.txt
386  snapshots/clojuredocs-snapshot-latest.txt
... ...
@@ -1,4 +1,4 @@
1  
-{:snapshot-time "Mon Apr 09 13:38:14 PDT 2012",
  1
+{:snapshot-time "Sun Apr 15 02:41:40 PDT 2012",
2 2
  :snapshot-info
3 3
  {"clojure.zip/insert-right"
4 4
   {:comments [],
@@ -595,7 +595,19 @@
595 595
      :line "1422",
596 596
      :arglists_comp "[bindings & body]",
597 597
      :url_friendly_name "when-let",
598  
-     :file "clojure/core.clj"}],
  598
+     :file "clojure/core.clj"}
  599
+    {:namespace_id 99,
  600
+     :weight 1,
  601
+     :name "if",
  602
+     :updated_at "2010-10-27 16:30:54.0",
  603
+     :version "1.2.0",
  604
+     :created_at "2010-10-20 04:44:11.0",
  605
+     :added nil,
  606
+     :url "http://clojuredocs.org/v/5269",
  607
+     :line nil,
  608
+     :arglists_comp "",
  609
+     :url_friendly_name "if",
  610
+     :file nil}],
599 611
    :examples
600 612
    [{:namespace_id 99,
601 613
      :ns "clojure.core",
@@ -618,7 +630,18 @@
618 630
      :lib_version "1.2.0",
619 631
      :library_id 3,
620 632
      :body
621  
-     "user=> (def has-value (when true\n                            (println \"Hello World\")\n                            \"Returned Value\"))\nHello World\n#'user/has-value\n\nuser=> has-value\n\"Returned Value\"\n\n"}],
  633
+     "user=> (def has-value (when true\n                            (println \"Hello World\")\n                            \"Returned Value\"))\nHello World\n#'user/has-value\n\nuser=> has-value\n\"Returned Value\"\n\n"}
  634
+    {:namespace_id 330,
  635
+     :ns "clojure.core",
  636
+     :updated_at "2012-04-12 22:01:36.0",
  637
+     :function "when",
  638
+     :version 1,
  639
+     :created_at "2012-04-12 22:01:36.0",
  640
+     :library "Clojure Core",
  641
+     :lib_version "1.3.0",
  642
+     :library_id 15,
  643
+     :body
  644
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
622 645
    :id 5836,
623 646
    :name "when",
624 647
    :ns "clojure.core",
@@ -2516,7 +2539,19 @@
2516 2539
    :url "http://clojuredocs.org/v/2632"},
2517 2540
   "clojure.core/*e"
2518 2541
   {:comments [],
2519  
-   :see-alsos [],
  2542
+   :see-alsos
  2543
+   [{:namespace_id 342,
  2544
+     :weight 0,
  2545
+     :name "pst",
  2546
+     :updated_at "2011-09-26 06:37:43.0",
  2547
+     :version "1.3.0",
  2548
+     :created_at "2011-09-26 06:15:16.0",
  2549
+     :added "1.3",
  2550
+     :url "http://clojuredocs.org/v/5972",
  2551
+     :line "242",
  2552
+     :arglists_comp "[]|[e-or-depth]|[e depth]",
  2553
+     :url_friendly_name "pst",
  2554
+     :file "clojure/repl.clj"}],
2520 2555
    :examples
2521 2556
    [{:namespace_id 99,
2522 2557
      :ns "clojure.core",
@@ -5164,6 +5199,18 @@
5164 5199
      :line "419",
5165 5200
      :arglists_comp "[test & body]",
5166 5201
      :url_friendly_name "when",
  5202
+     :file "clojure/core.clj"}
  5203
+    {:namespace_id 99,
  5204
+     :weight 3,
  5205
+     :name "if-let",
  5206
+     :updated_at "2011-05-19 15:27:29.0",
  5207
+     :version "1.2.0",
  5208
+     :created_at "2010-07-14 20:24:37.0",
  5209
+     :added nil,
  5210
+     :url "http://clojuredocs.org/v/1953",
  5211
+     :line "1403",
  5212
+     :arglists_comp "[bindings then]|[bindings then else & oldform]",
  5213
+     :url_friendly_name "if-let",
5167 5214
      :file "clojure/core.clj"}],
5168 5215
    :examples
5169 5216
    [{:namespace_id 99,
@@ -5176,7 +5223,18 @@
5176 5223
      :lib_version "1.2.0",
5177 5224
      :library_id 3,
5178 5225
      :body
5179  
-     "(defn is-small? [number]\n  (if (< number 100) \"yes\" \"no\"))\n\nuser=> (is-small? 50)\n\"yes\"\n\nuser=> (is-small? 500)\n\"no\""}],
  5226
+     "(defn is-small? [number]\n  (if (< number 100) \"yes\" \"no\"))\n\nuser=> (is-small? 50)\n\"yes\"\n\nuser=> (is-small? 500)\n\"no\""}
  5227
+    {:namespace_id 330,
  5228
+     :ns "clojure.core",
  5229
+     :updated_at "2012-04-13 22:18:22.0",
  5230
+     :function "if",
  5231
+     :version 4,
  5232
+     :created_at "2012-04-12 22:00:23.0",
  5233
+     :library "Clojure Core",
  5234
+     :lib_version "1.3.0",
  5235
+     :library_id 15,
  5236
+     :body
  5237
+     ";; Be aware that the only two values considered \"logical false\" in Clojure\n;; are nil and false, where Clojure's \"false\" is the Java value Boolean/FALSE\n;; under the hood.  Everything else is \"logical true\".  Particularly surprising\n;; may be that the Java Object with class Boolean and value (Boolean. false) is\n;; considered logical true.\n\n;; This notion of logical true and logical false holds for at least the following\n;; conditional statements in Clojure: if, cond, when, if-let, when-let.\n;; It also applies to functions like filter, remove, and others that use\n;; these conditional statements in their implementation.\n\n;; nil and false are logical false\nuser=> (if nil \"logical true\" \"logical false\")\n\"logical false\"\nuser=> (if false \"logical true\" \"logical false\")\n\"logical false\"\n;; Boolean/FALSE is how Clojure's \"false\" is represented internally.\nuser=> (if Boolean/FALSE \"logical true\" \"logical false\")\n\"logical false\"\n\n;; Everything else that is the value of the condition, including numbers,\n;; characters, strings, vectors, maps, _and_ a freshly constructed Boolean class\n;; object (Boolean. false), is logical true.\n\nuser=> (if 1 \"logical true\" \"logical false\")\n\"logical true\"\n;; A vector containing nil is not the same as nil.\nuser=> (if [nil] \"logical true\" \"logical false\")\n\"logical true\"\nuser=> (if (first [nil]) \"logical true\" \"logical false\")\n\"logical false\"\n\n;; Bad idea even in Java.  See below for more details.\nuser=> (if (Boolean. false) \"logical true\" \"logical false\")\n\"logical true\"\n\n;; Java documentation itself warns:\n;; Note: It is rarely appropriate to use this constructor. Unless a new instance\n;; is required, the static factory valueOf(boolean) is generally a better choice.\n;; It is likely to yield significantly better space and time performance.\n\n;; (boolean x) converts a value to a primitive boolean.  It converts nil, false,\n;; and (Boolean. false) to primitive false.\nuser=> (if (boolean (Boolean. false)) \"logical true\" \"logical false\")\n\"logical false\"\n\n;; (Boolean/valueOf <val>) is similar:\nuser=> (if (Boolean/valueOf (Boolean. false)) \"logical true\" \"logical false\")\n\"logical false\"\n"}],
5180 5238
    :id 6126,
5181 5239
    :name "if",
5182 5240
    :ns "clojure.core",
@@ -9184,7 +9242,19 @@
9184 9242
    :url "http://clojuredocs.org/v/3198"},
9185 9243
   "clojure.core/bytes"
9186 9244
   {:comments [],
9187  
-   :see-alsos [],
  9245
+   :see-alsos
  9246
+   [{:namespace_id 99,
  9247
+     :weight 1,
  9248
+     :name "byte-array",
  9249
+     :updated_at "2011-08-21 13:51:48.0",
  9250
+     :version "1.2.0",
  9251
+     :created_at "2010-07-14 20:25:03.0",
  9252
+     :added nil,
  9253
+     :url "http://clojuredocs.org/v/1993",
  9254
+     :line "4152",
  9255
+     :arglists_comp "[size-or-seq]|[size init-val-or-seq]",
  9256
+     :url_friendly_name "byte-array",
  9257
+     :file "clojure/core.clj"}],
9188 9258
    :examples [],
9189 9259
    :id 5400,
9190 9260
    :name "bytes",
@@ -9724,7 +9794,19 @@
9724 9794
      :line "1422",
9725 9795
      :arglists_comp "[bindings & body]",
9726 9796
      :url_friendly_name "when-let",
9727  
-     :file "clojure/core.clj"}],
  9797
+     :file "clojure/core.clj"}
  9798
+    {:namespace_id 99,
  9799
+     :weight 1,
  9800
+     :name "if",
  9801
+     :updated_at "2010-10-27 16:30:54.0",
  9802
+     :version "1.2.0",
  9803
+     :created_at "2010-10-20 04:44:11.0",
  9804
+     :added nil,
  9805
+     :url "http://clojuredocs.org/v/5269",
  9806
+     :line nil,
  9807
+     :arglists_comp "",
  9808
+     :url_friendly_name "if",
  9809
+     :file nil}],
9728 9810
    :examples
9729 9811
    [{:namespace_id 99,
9730 9812
      :ns "clojure.core",
@@ -9736,7 +9818,18 @@
9736 9818
      :lib_version "1.2.0",
9737 9819
      :library_id 3,
9738 9820
      :body
9739  
-     "user=> (map\n         #(when-not (= %2 %3) [%1 %2 %3])\n         (iterate inc 0)\n         [:a :b :c]\n         [:a :a :a])\n\n(nil [1 :b :a] [2 :c :a])\n"}],
  9821
+     "user=> (map\n         #(when-not (= %2 %3) [%1 %2 %3])\n         (iterate inc 0)\n         [:a :b :c]\n         [:a :a :a])\n\n(nil [1 :b :a] [2 :c :a])\n"}
  9822
+    {:namespace_id 330,
  9823
+     :ns "clojure.core",
  9824
+     :updated_at "2012-04-12 22:02:50.0",
  9825
+     :function "when-not",
  9826
+     :version 1,
  9827
+     :created_at "2012-04-12 22:02:50.0",
  9828
+     :library "Clojure Core",
  9829
+     :lib_version "1.3.0",
  9830
+     :library_id 15,
  9831
+     :body
  9832
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
9740 9833
    :id 5839,
9741 9834
    :name "when-not",
9742 9835
    :ns "clojure.core",
@@ -12338,7 +12431,19 @@
12338 12431
      :line "491",
12339 12432
      :arglists_comp "[& clauses]",
12340 12433
      :url_friendly_name "cond",
12341  
-     :file "clojure/core.clj"}],
  12434
+     :file "clojure/core.clj"}
  12435
+    {:namespace_id 99,
  12436
+     :weight 1,
  12437
+     :name "if",
  12438
+     :updated_at "2010-10-27 16:30:54.0",
  12439
+     :version "1.2.0",
  12440
+     :created_at "2010-10-20 04:44:11.0",
  12441
+     :added nil,
  12442
+     :url "http://clojuredocs.org/v/5269",
  12443
+     :line nil,
  12444
+     :arglists_comp "",
  12445
+     :url_friendly_name "if",
  12446
+     :file nil}],
12342 12447
    :examples
12343 12448
    [{:namespace_id 99,
12344 12449
      :ns "clojure.core",
@@ -12383,7 +12488,18 @@
12383 12488
      :lib_version "1.2.0",
12384 12489
      :library_id 3,
12385 12490
      :body
12386  
-     "user=> (condp (comp seq re-seq) \"foo=bar\"\n         #\"[+](\\w+)\"    :>> #(vector (-> % first (nth 1) keyword) true)\n         #\"[-](\\w+)\"    :>> #(vector (-> % first (nth 1) keyword) false)\n         #\"(\\w+)=(\\S+)\" :>> #(let [x (first %)]\n                               [(keyword (nth x 1)) (nth x 2)]))\n\n[:foo \"bar\"]"}],
  12491
+     "user=> (condp (comp seq re-seq) \"foo=bar\"\n         #\"[+](\\w+)\"    :>> #(vector (-> % first (nth 1) keyword) true)\n         #\"[-](\\w+)\"    :>> #(vector (-> % first (nth 1) keyword) false)\n         #\"(\\w+)=(\\S+)\" :>> #(let [x (first %)]\n                               [(keyword (nth x 1)) (nth x 2)]))\n\n[:foo \"bar\"]"}
  12492
+    {:namespace_id 330,
  12493
+     :ns "clojure.core",
  12494
+     :updated_at "2012-04-12 22:13:47.0",
  12495
+     :function "condp",
  12496
+     :version 1,
  12497
+     :created_at "2012-04-12 22:13:47.0",
  12498
+     :library "Clojure Core",
  12499
+     :lib_version "1.3.0",
  12500
+     :library_id 15,
  12501
+     :body
  12502
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
12387 12503
    :id 5432,
12388 12504
    :name "condp",
12389 12505
    :ns "clojure.core",
@@ -12638,7 +12754,18 @@
12638 12754
      :lib_version "1.2.0",
12639 12755
      :library_id 3,
12640 12756
      :body
12641  
-     "user=> (let [grade 85]\n         (cond\n           (> grade 90) \"A\"\n           (> grade 80) \"B\"\n           (> grade 70) \"C\"\n           (> grade 60) \"D\"\n           :else \"F\"))\n\"B\""}],
  12757
+     "user=> (let [grade 85]\n         (cond\n           (> grade 90) \"A\"\n           (> grade 80) \"B\"\n           (> grade 70) \"C\"\n           (> grade 60) \"D\"\n           :else \"F\"))\n\"B\""}
  12758
+    {:namespace_id 330,
  12759
+     :ns "clojure.core",
  12760
+     :updated_at "2012-04-12 22:01:55.0",
  12761
+     :function "cond",
  12762
+     :version 1,
  12763
+     :created_at "2012-04-12 22:01:55.0",
  12764
+     :library "Clojure Core",
  12765
+     :lib_version "1.3.0",
  12766
+     :library_id 15,
  12767
+     :body
  12768
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
12642 12769
    :id 5431,
12643 12770
    :name "cond",
12644 12771
    :ns "clojure.core",
@@ -14212,7 +14339,19 @@
14212 14339
      :line "693",
14213 14340
      :arglists_comp "[]|[x]|[x & next]",
14214 14341
      :url_friendly_name "and",
14215  
-     :file "clojure/core.clj"}],
  14342
+     :file "clojure/core.clj"}
  14343
+    {:namespace_id 99,
  14344
+     :weight 1,
  14345
+     :name "if",
  14346
+     :updated_at "2010-10-27 16:30:54.0",
  14347
+     :version "1.2.0",
  14348
+     :created_at "2010-10-20 04:44:11.0",
  14349
+     :added nil,
  14350
+     :url "http://clojuredocs.org/v/5269",
  14351
+     :line nil,
  14352
+     :arglists_comp "",
  14353
+     :url_friendly_name "if",
  14354
+     :file nil}],
14216 14355
    :examples
14217 14356
    [{:namespace_id 99,
14218 14357
      :ns "clojure.core",
@@ -14224,7 +14363,18 @@
14224 14363
      :lib_version "1.2.0",
14225 14364
      :library_id 3,
14226 14365
      :body
14227  
-     "user> (or true false false)\ntrue\n\nuser> (or true true true)\ntrue\n\nuser> (or false false false)\nfalse\n\nuser> (or nil nil)\nnil\n\nuser> (or false nil)\nnil\n\nuser> (or true nil)\ntrue\n\n;; or doesn't evaluate if the first value is true\nuser> (or true (println \"foo\"))\ntrue\n\n;; order matters\nuser> (or (println \"foo\") true)\nfoo\ntrue"}],
  14366
+     "user> (or true false false)\ntrue\n\nuser> (or true true true)\ntrue\n\nuser> (or false false false)\nfalse\n\nuser> (or nil nil)\nnil\n\nuser> (or false nil)\nnil\n\nuser> (or true nil)\ntrue\n\n;; or doesn't evaluate if the first value is true\nuser> (or true (println \"foo\"))\ntrue\n\n;; order matters\nuser> (or (println \"foo\") true)\nfoo\ntrue"}
  14367
+    {:namespace_id 330,
  14368
+     :ns "clojure.core",
  14369
+     :updated_at "2012-04-12 22:13:01.0",
  14370
+     :function "or",
  14371
+     :version 1,
  14372
+     :created_at "2012-04-12 22:13:01.0",
  14373
+     :library "Clojure Core",
  14374
+     :lib_version "1.3.0",
  14375
+     :library_id 15,
  14376
+     :body
  14377
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
14228 14378
    :id 5650,
14229 14379
    :name "or",
14230 14380
    :ns "clojure.core",
@@ -14700,7 +14850,19 @@
14700 14850
    :url "http://clojuredocs.org/v/5959"},
14701 14851
   "clojure.core/if-not"
14702 14852
   {:comments [],
14703  
-   :see-alsos [],
  14853
+   :see-alsos
  14854
+   [{:namespace_id 99,
  14855
+     :weight 1,
  14856
+     :name "if",
  14857
+     :updated_at "2010-10-27 16:30:54.0",
  14858
+     :version "1.2.0",
  14859
+     :created_at "2010-10-20 04:44:11.0",
  14860
+     :added nil,
  14861
+     :url "http://clojuredocs.org/v/5269",
  14862
+     :line nil,
  14863
+     :arglists_comp "",
  14864
+     :url_friendly_name "if",
  14865
+     :file nil}],
14704 14866
    :examples
14705 14867
    [{:namespace_id 99,
14706 14868
      :ns "clojure.core",
@@ -14722,7 +14884,18 @@
14722 14884
      :library "Clojure Core",
14723 14885
      :lib_version "1.2.0",
14724 14886
      :library_id 3,
14725  
-     :body "user=> (if-not (zero? 0) :then :else)\n:else"}],
  14887
+     :body "user=> (if-not (zero? 0) :then :else)\n:else"}
  14888
+    {:namespace_id 330,
  14889
+     :ns "clojure.core",
  14890
+     :updated_at "2012-04-12 22:03:31.0",
  14891
+     :function "if-not",
  14892
+     :version 1,
  14893
+     :created_at "2012-04-12 22:03:31.0",
  14894
+     :library "Clojure Core",
  14895
+     :lib_version "1.3.0",
  14896
+     :library_id 15,
  14897
+     :body
  14898
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
14726 14899
    :id 5549,
14727 14900
    :name "if-not",
14728 14901
    :ns "clojure.core",
@@ -18151,7 +18324,43 @@
18151 18324
    :url "http://clojuredocs.org/v/5668"},
18152 18325
   "clojure.core/realized?"
18153 18326
   {:comments [],
18154  
-   :see-alsos [],
  18327
+   :see-alsos
  18328
+   [{:namespace_id 99,
  18329
+     :weight 1,
  18330
+     :name "promise",
  18331
+     :updated_at "2010-10-20 04:42:04.0",
  18332
+     :version "1.2.0",
  18333
+     :created_at "2010-07-14 20:20:27.0",
  18334
+     :added nil,
  18335
+     :url "http://clojuredocs.org/v/1591",
  18336
+     :line "5501",
  18337
+     :arglists_comp "[]",
  18338
+     :url_friendly_name "promise",
  18339
+     :file "clojure/core.clj"}
  18340
+    {:namespace_id 99,
  18341
+     :weight 1,
  18342
+     :name "delay",
  18343
+     :updated_at "2010-10-20 04:42:13.0",
  18344
+     :version "1.2.0",
  18345
+     :created_at "2010-07-14 20:24:57.0",
  18346
+     :added nil,
  18347
+     :url "http://clojuredocs.org/v/1986",
  18348
+     :line "619",
  18349
+     :arglists_comp "[& body]",
  18350
+     :url_friendly_name "delay",
  18351
+     :file "clojure/core.clj"}
  18352
+    {:namespace_id 99,
  18353
+     :weight 2,
  18354
+     :name "future",
  18355
+     :updated_at "2011-08-03 05:43:23.0",
  18356
+     :version "1.2.0",
  18357
+     :created_at "2010-07-14 20:21:27.0",
  18358
+     :added nil,
  18359
+     :url "http://clojuredocs.org/v/1677",
  18360
+     :line "5407",
  18361
+     :arglists_comp "[& body]",
  18362
+     :url_friendly_name "future",
  18363
+     :file "clojure/core.clj"}],
18155 18364
    :examples
18156 18365
    [{:namespace_id 330,
18157 18366
      :ns "clojure.core",
@@ -19022,7 +19231,29 @@
19022 19231
      :lib_version "1.3.0",
19023 19232
      :library_id 15,
19024 19233
      :body
19025  
-     "; Combine a set of collections into a single collection\nuser=> (reduce into [[1 2 3] [:a :b :c] '([4 5] 6)])\n[1 2 3 :a :b :c [4 5] 6]"}],
  19234
+     "; Combine a set of collections into a single collection\nuser=> (reduce into [[1 2 3] [:a :b :c] '([4 5] 6)])\n[1 2 3 :a :b :c [4 5] 6]"}
  19235
+    {:namespace_id 330,
  19236
+     :ns "clojure.core",
  19237
+     :updated_at "2012-04-12 13:02:08.0",
  19238
+     :function "reduce",
  19239
+     :version 1,
  19240
+     :created_at "2012-04-12 13:02:08.0",
  19241
+     :library "Clojure Core",
  19242
+     :lib_version "1.3.0",
  19243
+     :library_id 15,
  19244
+     :body
  19245
+     "(defn key-pres?\n    \"This function accepts a value (cmp-val) and a vector of vectors\n    (parsed output from clojure-csv) and returns the match value\n    back if found and nil if not found. \n\n    Using reduce, the function searches every vector row to see \n    if cmp-val is at the col-idx location in the vector.\"\n\n    [cmp-val cmp-idx csv-data]\n    (reduce\n        (fn [ret-rc csv-row]\n            (if (= cmp-val (nth csv-row col-idx nil))\n                    (conj ret-rc cmp-val)))\n        [] \n        csv-data))"}
  19246
+    {:namespace_id 330,
  19247
+     :ns "clojure.core",
  19248
+     :updated_at "2012-04-12 13:10:50.0",
  19249
+     :function "reduce",
  19250
+     :version 2,
  19251
+     :created_at "2012-04-12 13:07:01.0",
  19252
+     :library "Clojure Core",
  19253
+     :lib_version "1.3.0",
  19254
+     :library_id 15,
  19255
+     :body
  19256
+     "(defn reduce-csv-row\n    \"Accepts a csv-row (a vector) a list of columns to extract, \n     and reduces (and returns) a csv-row to a subset based on \n     selection using the values in col-nums (a vector of integer \n     vector positions.)\"\n\n    [csv-row col-nums]\n\n    (reduce\n        (fn [out-csv-row col-num]\n            ; Don't consider short vectors containing junk.\n            (if-not (<= (count csv-row) 1)\n                (conj out-csv-row (nth csv-row col-num nil))))\n        []\n        col-nums))\n\n"}],
19026 19257
    :id 5706,
19027 19258
    :name "reduce",
19028 19259
    :ns "clojure.core",
@@ -22282,7 +22513,18 @@
22282 22513
      :lib_version "1.2.0",
22283 22514
      :library_id 3,
22284 22515
      :body
22285  
-     "user=> (vec '(1 2 3))\n[1 2 3]\n\nuser=> (vec [1 2 3])\n[1 2 3]\n\nuser=> (vec '())\n[]\n\nuser=> (vec nil)\n[]"}],
  22516
+     "user=> (vec '(1 2 3))\n[1 2 3]\n\nuser=> (vec [1 2 3])\n[1 2 3]\n\nuser=> (vec '())\n[]\n\nuser=> (vec nil)\n[]"}
  22517
+    {:namespace_id 330,
  22518
+     :ns "clojure.core",
  22519
+     :updated_at "2012-04-14 21:21:05.0",
  22520
+     :function "vec",
  22521
+     :version 1,
  22522
+     :created_at "2012-04-14 21:21:05.0",
  22523
+     :library "Clojure Core",
  22524
+     :lib_version "1.3.0",
  22525
+     :library_id 15,
  22526
+     :body
  22527
+     ";; Warning.  If the arg is a Java array, then the returned vector will alias it,\n;; and modifying the array will thus modify the vector.  To avoid this, do\n;; not modify the array after the vec call.  One way to guarantee this is to\n;; make a copy of the array, call vec on the new array, and then lose all\n;; references to the copy so it cannot be accessed in any way.\n\nuser=> (def a (to-array (repeat 4 0)))\n#'user/a\nuser=> (seq a)\n(0 0 0 0)\nuser=> (def v (vec a))\n#'user/v\nuser=> v\n[0 0 0 0]\n\n;; Now change a, and v changes, too, since they share state.\nuser=> (aset a 2 -5)\n-5\nuser=> v\n[0 0 -5 0]\n\n;; One way to avoid this\nuser=> (def v (vec (aclone a)))\n#'user/v\nuser=> v\n[0 0 -5 0]\nuser=> (aset a 2 -20)\n-20\nuser=> v\n[0 0 -5 0]\n"}],
22286 22528
    :id 5832,
22287 22529
    :name "vec",
22288 22530
    :ns "clojure.core",
@@ -23033,7 +23275,19 @@
23033 23275
    :url "http://clojuredocs.org/v/486"},
23034 23276
   "clojure.core/byte"
23035 23277
   {:comments [],
23036  
-   :see-alsos [],
  23278
+   :see-alsos
  23279
+   [{:namespace_id 99,
  23280
+     :weight 1,
  23281
+     :name "byte-array",
  23282
+     :updated_at "2011-08-21 13:51:48.0",
  23283
+     :version "1.2.0",
  23284
+     :created_at "2010-07-14 20:25:03.0",
  23285
+     :added nil,
  23286
+     :url "http://clojuredocs.org/v/1993",
  23287
+     :line "4152",
  23288
+     :arglists_comp "[size-or-seq]|[size init-val-or-seq]",
  23289
+     :url_friendly_name "byte-array",
  23290
+     :file "clojure/core.clj"}],
23037 23291
    :examples
23038 23292
    [{:namespace_id 99,
23039 23293
      :ns "clojure.core",
@@ -23427,7 +23681,19 @@
23427 23681
      :line "425",
23428 23682
      :arglists_comp "[test & body]",
23429 23683
      :url_friendly_name "when-not",
23430  
-     :file "clojure/core.clj"}],
  23684
+     :file "clojure/core.clj"}
  23685
+    {:namespace_id 99,
  23686
+     :weight 1,
  23687
+     :name "if",
  23688
+     :updated_at "2010-10-27 16:30:54.0",
  23689
+     :version "1.2.0",
  23690
+     :created_at "2010-10-20 04:44:11.0",
  23691
+     :added nil,
  23692
+     :url "http://clojuredocs.org/v/5269",
  23693
+     :line nil,
  23694
+     :arglists_comp "",
  23695
+     :url_friendly_name "if",
  23696
+     :file nil}],
23431 23697
    :examples
23432 23698
    [{:namespace_id 99,
23433 23699
      :ns "clojure.core",
@@ -23439,7 +23705,18 @@
23439 23705
      :lib_version "1.2.0",
23440 23706
      :library_id 3,
23441 23707
      :body
23442  
-     ";; Very useful when working with sequences. Capturing the retun value \n;; of `seq` brings a performance gain in subsequent `first`/`rest`/`next`\n;; calls. Also the block is guarded by `nil` punning.\n\n(defn drop-one\n  [coll]\n  (when-let [s (seq coll)]\n    (rest s)))\n\nuser=> (drop-one [1 2 3])\n(2 3)\nuser=> (drop-one [])\nnil\n"}],
  23708
+     ";; Very useful when working with sequences. Capturing the retun value \n;; of `seq` brings a performance gain in subsequent `first`/`rest`/`next`\n;; calls. Also the block is guarded by `nil` punning.\n\n(defn drop-one\n  [coll]\n  (when-let [s (seq coll)]\n    (rest s)))\n\nuser=> (drop-one [1 2 3])\n(2 3)\nuser=> (drop-one [])\nnil\n"}
  23709
+    {:namespace_id 330,
  23710
+     :ns "clojure.core",
  23711
+     :updated_at "2012-04-12 22:03:15.0",
  23712
+     :function "when-let",
  23713
+     :version 1,
  23714
+     :created_at "2012-04-12 22:03:15.0",
  23715
+     :library "Clojure Core",
  23716
+     :lib_version "1.3.0",
  23717
+     :library_id 15,
  23718
+     :body
  23719
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
23443 23720
    :id 5838,
23444 23721
    :name "when-let",
23445 23722
    :ns "clojure.core",
@@ -26957,7 +27234,18 @@
26957 27234
      :lib_version "1.2.0",
26958 27235
      :library_id 3,
26959 27236
      :body
26960  
-     "; This macro is nice when you need to calculate something big. And you need \n; to use the result but only when it's true:\n\n(if-let [life (meaning-of-life 12)]\n   life\n   (if-let [origin (origin-of-life 1)]\n      origin\n      (if-let [shot (who-shot-jr 5)]\n         block-sol\n\t 42)))\n\n; As you can see in the above example it will return the answer \n; to the question only if the answer is not nil. If the answer\n; is nil it will move to the next question. Until finally it\n; gives up and returns 42."}],
  27237
+     "; This macro is nice when you need to calculate something big. And you need \n; to use the result but only when it's true:\n\n(if-let [life (meaning-of-life 12)]\n   life\n   (if-let [origin (origin-of-life 1)]\n      origin\n      (if-let [shot (who-shot-jr 5)]\n         block-sol\n\t 42)))\n\n; As you can see in the above example it will return the answer \n; to the question only if the answer is not nil. If the answer\n; is nil it will move to the next question. Until finally it\n; gives up and returns 42."}
  27238
+    {:namespace_id 330,
  27239
+     :ns "clojure.core",
  27240
+     :updated_at "2012-04-12 22:02:06.0",
  27241
+     :function "if-let",
  27242
+     :version 1,
  27243
+     :created_at "2012-04-12 22:02:06.0",
  27244
+     :library "Clojure Core",
  27245
+     :lib_version "1.3.0",
  27246
+     :library_id 15,
  27247
+     :body
  27248
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
26961 27249
    :id 5548,
26962 27250
    :name "if-let",
26963 27251
    :ns "clojure.core",
@@ -27311,7 +27599,19 @@
27311 27599
      :line "705",
27312 27600
      :arglists_comp "[]|[x]|[x & next]",
27313 27601
      :url_friendly_name "or",
27314  
-     :file "clojure/core.clj"}],
  27602
+     :file "clojure/core.clj"}
  27603
+    {:namespace_id 99,
  27604
+     :weight 1,
  27605
+     :name "if",
  27606
+     :updated_at "2010-10-27 16:30:54.0",
  27607
+     :version "1.2.0",
  27608
+     :created_at "2010-10-20 04:44:11.0",
  27609
+     :added nil,
  27610
+     :url "http://clojuredocs.org/v/5269",
  27611
+     :line nil,
  27612
+     :arglists_comp "",
  27613
+     :url_friendly_name "if",
  27614
+     :file nil}],
27315 27615
    :examples
27316 27616
    [{:namespace_id 99,
27317 27617
      :ns "clojure.core",
@@ -27323,7 +27623,18 @@
27323 27623
      :lib_version "1.2.0",
27324 27624
      :library_id 3,
27325 27625
      :body
27326  
-     "user=> (and true true)\ntrue\n\nuser=> (and true false)\nfalse\n\nuser=> (and false false)\nfalse\n\nuser=> (and '() '())\n()\n\nuser=> (and '[] '[])\n[]\n\nuser=> (and 0 1)  ; Note that this is *not* bitwise 'and'\n1\n\nuser=> (and 1 0)\n0\n\nuser=> (and (constantly true) (> 2 1))\ntrue"}],
  27626
+     "user=> (and true true)\ntrue\n\nuser=> (and true false)\nfalse\n\nuser=> (and false false)\nfalse\n\nuser=> (and '() '())\n()\n\nuser=> (and '[] '[])\n[]\n\nuser=> (and 0 1)  ; Note that this is *not* bitwise 'and'\n1\n\nuser=> (and 1 0)\n0\n\nuser=> (and (constantly true) (> 2 1))\ntrue"}
  27627
+    {:namespace_id 330,
  27628
+     :ns "clojure.core",
  27629
+     :updated_at "2012-04-12 22:12:48.0",
  27630
+     :function "and",
  27631
+     :version 1,
  27632
+     :created_at "2012-04-12 22:12:48.0",
  27633
+     :library "Clojure Core",
  27634
+     :lib_version "1.3.0",
  27635
+     :library_id 15,
  27636
+     :body
  27637
+     ";; See examples for \"if\" explaining Clojure's idea of logical true\n;; and logical false."}],
27327 27638
    :id 5352,
27328 27639
    :name "and",
27329 27640
    :ns "clojure.core",
@@ -36662,7 +36973,18 @@
36662 36973
      :lib_version "1.2.0",
36663 36974
      :library_id 3,
36664 36975
      :body
36665  
-     "<pre>user=&gt; (bit-shift-left 2r1101 2) ; fill rightmost bits with 0s\r\n52 \r\n;; 52 = 2r110100\r\n</pre>\r\n"}],
  36976
+     "<pre>user=&gt; (bit-shift-left 2r1101 2) ; fill rightmost bits with 0s\r\n52 \r\n;; 52 = 2r110100\r\n</pre>\r\n"}
  36977
+    {:namespace_id 330,
  36978
+     :ns "clojure.core",
  36979
+     :updated_at "2012-04-13 04:21:02.0",
  36980
+     :function "bit-shift-left",
  36981
+     :version 2,
  36982
+     :created_at "2012-04-13 04:18:46.0",
  36983
+     :library "Clojure Core",
  36984
+     :lib_version "1.3.0",
  36985
+     :library_id 15,
  36986
+     :body
  36987
+     ";;a bogus bit-array implementation\n\n(def ba (atom (long 0)))\n\n(defn set-ba \n\"sets bit n in long atom ba\"\n  [n]\n  (let [number-set (bit-shift-left 1 n)\n\t_ (println \"number to set: \" number-set)\n\tnew-array (bit-or @ba number-set)]\n    (reset! ba new-array)))\n\n(defn get-ba \n\"gets bit n in long atom ba\"\n[n]\n  (not (zero? (bit-and (bit-shift-left 1 n) @ba))))\n\n(comment\n  (set-ba 0) ;; 0 [....0001]\n  (set-ba 3) ;; 2^3 = 8  [....1001]\n  (get-ba 0) ;; (bit-and ba 2^0) = 1\n  (get-ba 1) ;; (bit-and ba 2^1) = 0\n  (get-ba 3) ;; (bit-and ba 2^3) = 1\n  ;;but:\n  (set-ba 65) ;; [....1011]\n  ;;number to set:  2\n  ;;modulo because long has only 64 bit\n  ;;also note that long always is two-complemented (signed) in java implementation\n  )"}],
36666 36988
    :id 5387,
36667 36989
    :name "bit-shift-left",
36668 36990
    :ns "clojure.core",
@@ -42098,7 +42420,19 @@
42098 42420
    :url "http://clojuredocs.org/v/5266"},
42099 42421
   "clojure.repl/pst"
42100 42422
   {:comments [],
42101  
-   :see-alsos [],
  42423
+   :see-alsos
  42424
+   [{:namespace_id 99,
  42425
+     :weight 1,
  42426
+     :name "*e",
  42427
+     :updated_at "2010-10-20 04:42:06.0",
  42428
+     :version "1.2.0",
  42429
+     :created_at "2010-07-14 20:21:54.0",
  42430
+     :added nil,
  42431
+     :url "http://clojuredocs.org/v/1717",
  42432
+     :line "5035",
  42433
+     :arglists_comp "",
  42434
+     :url_friendly_name "*e",
  42435
+     :file "clojure/core.clj"}],
42102 42436
    :examples [],
42103 42437
    :id 5972,
42104 42438
    :name "pst",

0 notes on commit f13de7e

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