Hi,
Not sure if this is a novice thing or a real bug. Here's what I
encountered: I'm calling a Java method which returns a String[], which
I then pass to partition to get a list of lists (I know, sequence, but
list is a shorter word). What happens then, is I loop over my list of
lists with (loop .. (recur (rest ...))) and as the very last thing I
get an empty list instead of nil. This doesn't look ok to me, but then
again I could be terribly wrong since I rather novice in clojure.
Here's the code (never mind the complete lack of logic in this
function - it's been stripped):
(defn authenticate? [uri name pass]
(loop [user-pass (partition 2 (.getStringArray *conf*
"authentication"))]
(if user-pass
(if (re-matches (re-pattern (ffirst user-pass)) uri )
true
(recur (rest user-pass)))
false)
))
Calling this function throws a NullPointerException. Any hint is
greatly appreciated.
Thanks,
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en