Skip to content

Commit

Permalink
swapped argument order; string argument now comes last
Browse files Browse the repository at this point in the history
  • Loading branch information
joodie committed Apr 5, 2011
1 parent 0684377 commit 5292156
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -10,12 +10,12 @@ Combine predicates into new ones, plus a bunch of predicates on strings.
(integer? "-123213")
(web-url "http://foo.bar/somewhere")
(hex? "deadb33f")
(length? "bla" 3)
(length? "bla" 2 4)
(length? 3 "bla")
(length? 2 4 "bla)

((every-p?
natural
#(length % 2 3))
(partial length 2 3))
"123")
## License
Expand Down
4 changes: 2 additions & 2 deletions src/pretzel/strings.clj
Expand Up @@ -5,9 +5,9 @@

(defn length?
"true if length of string s is len or within the range [min ... max]"
([^String s len]
([^String len s]
(= (.length s) len))
([^String s min max]
([^String min max s]
(<= min (.length s) max)))

(defn natural?
Expand Down

0 comments on commit 5292156

Please sign in to comment.