On Apr 6, 4:10 am, Stuart Sierra <[email protected]> wrote:
> I don't see an obvious way of combining them.
What about something like:
(defn- normalize-separator
[filepath]
(.. (str filepath)
(replace \\ File/separatorChar)
(replace \/ File/separatorChar)))
(defn file
[filepath & more]
(reduce
(fn [parent path] (File. parent path))
(File. (normalize-separator filepath))
(map normalize-separator more)))
- James
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---