This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-28
Channels
- # aleph (2)
- # beginners (25)
- # boot (12)
- # cider (73)
- # cljs-dev (3)
- # clojure (37)
- # clojure-dev (93)
- # clojure-germany (1)
- # clojure-italy (24)
- # clojure-nl (21)
- # clojure-russia (26)
- # clojure-spec (37)
- # clojure-uk (80)
- # clojure-za (1)
- # clojurescript (47)
- # cursive (4)
- # data-science (17)
- # datomic (69)
- # emacs (19)
- # events (7)
- # fulcro (41)
- # hoplon (14)
- # leiningen (2)
- # nrepl (4)
- # off-topic (253)
- # om (11)
- # portkey (2)
- # re-frame (11)
- # reagent (24)
- # ring-swagger (1)
- # rum (5)
- # schema (1)
- # shadow-cljs (106)
- # specter (2)
- # tools-deps (91)
Why I get this error java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn
on this --> (list "string1" "string2")
@d.guay What do you get if you evaluate list
. (Is it a string?) Thinking that you may have done something like (def list "abc")
Hi folks. I'm using Cursive with its lein repl integration. Everything works great except the repl prompt doesn't show the namespace. I can't work out how to configure/investigate this.
Oopsie—found the :repl-options :prompt setting. I was just confused that it didn't default to showing the ns.
user=> (list? (seq '(1 2)))
true
seq isn't a concrete type, there's a few kinds of things that are seqs
like I said, seq's are abstract. Lists are seqs.
specifically, they are objects that extend ISeq
user=> (supers (class '(1 2)))
#{clojure.lang.IReduce clojure.lang.IPersistentList clojure.lang.IObj clojure.lang.IPersistentStack clojure.lang.ISeq clojure.lang.Seqable clojure.lang.IMeta clojure.lang.IReduceInit java.lang.Iterable java.util.List clojure.lang.IHashEq java.lang.Object clojure.lang.Obj java.util.Collection clojure.lang.Counted clojure.lang.Sequential clojure.lang.ASeq clojure.lang.IPersistentCollection java.io.Serializable}
Those are all of the parent classes of a list. Anything implementing clojure.lang.ISeq is a seq.
there's a few things - there's no specific thing that's a seq - a seq is a name for anything which implements ISeq - for example lazy-seq which is created by map, filter, etc. is a seq
also cons
and lists
oh you said that above