Permalink
Browse files

Merge pull request #10 from sjl/master

Add a 'string' convenience function.
  • Loading branch information...
youngnh committed Sep 13, 2012
2 parents 62a199a + e58f0db commit 94feadde75a35e37490444ce77b3c84d2b23d2b9
View
@@ -2,4 +2,5 @@ pom.xml
*jar
lib
classes
-.lein*
+.lein*
+target/
View
@@ -234,6 +234,12 @@
[]
(token #(Character/isLetter %)))
+(defn string
+ "Consume the given string"
+ [s]
+ (reduce nxt (concat (map char s)
+ (list (always s)))))
+
(defn between
"Parse p after parsing open and before parsing close, returning the
value of p and discarding the values of open and close"

0 comments on commit 94feadd

Please sign in to comment.