Let's say you're a new user and you want to split a  string on a
delimiter in clojure.

Okay, I  google  "string split" in clojure.
I find this at http://clojure.github.com/clojure/clojure.string-api.html

(ns your.namespace.here
  (:require '[clojure.string :as str]))

and see there is a "split" function.


Okay I try this:
(ns user
  (:require '[clojure.string :as str]))

(def x "dfas,d,d,dsf")

(split x  ",")

I get an error message:
Clojure 1.2.0
java.lang.Exception: lib names inside prefix lists must not contain
periods (test.clj:1)
1:1 user=> #<Namespace user>
1:2 user=>

Is the doc out of date?

Now I try newLisp. I look for string split. I find this the "parse"
function.
I try this:

(set 'x "dfd,dfs,fds,asf,sdf")
"dfd,dfs,fds,asf,sdf"
> (parse x {,})
It just works.

Can't clojure just go ahead and include a string library in the
standard library?
Or make it easier to use libraries in general. I always have a problem
with require, use,etc.etc.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to