summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2008-03-11 02:09:58 +0000
committerRich Hickey <richhickey@gmail.com>2008-03-11 02:09:58 +0000
commite113c3192846af8f7f1db73824a89eb39292355e (patch)
tree753b7f0032a58cd3f851d4728d9d89acf5857ccf
parent6ee1f3f74a64463ebaf5d0e9eaa456bf7dd10dfe (diff)
moving to new metadata/docstrings
-rw-r--r--src/boot.clj26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/boot.clj b/src/boot.clj
index 3f39ff3a..0ac2383b 100644
--- a/src/boot.clj
+++ b/src/boot.clj
@@ -2058,19 +2058,19 @@ make-proxy [classes method-map]
[#^java.util.regex.Pattern re s]
(. re (matcher s)))
-(defn
- #^{:doc "Returns the groups from the most recent match/find. If
- there are no nested groups, returns a string of the entire
- match. If there are nested groups, returns a vector of the
- groups, the first element being the entire match."}
-re-groups [#^java.util.regex.Matcher m]
- (let [gc (. m (groupCount))]
- (if (zero? gc)
- (. m (group))
- (loop [ret [] c 0]
- (if (<= c gc)
- (recur (conj ret (. m (group c))) (inc c))
- ret)))))
+(defn re-groups
+ "Returns the groups from the most recent match/find. If there are no
+ nested groups, returns a string of the entire match. If there are
+ nested groups, returns a vector of the groups, the first element
+ being the entire match."
+ [#^java.util.regex.Matcher m]
+ (let [gc (. m (groupCount))]
+ (if (zero? gc)
+ (. m (group))
+ (loop [ret [] c 0]
+ (if (<= c gc)
+ (recur (conj ret (. m (group c))) (inc c))
+ ret)))))
(defn re-seq
"Returns a lazy sequence of successive matches of pattern in string,