This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-15
Channels
- # admin-announcements (1)
- # announcements (8)
- # babashka (6)
- # beginners (70)
- # bristol-clojurians (1)
- # chlorine-clover (15)
- # cider (3)
- # cljs-dev (2)
- # cljsrn (27)
- # clojure (249)
- # clojure-europe (19)
- # clojure-italy (2)
- # clojure-nl (12)
- # clojure-spec (11)
- # clojure-uk (42)
- # clojuredesign-podcast (6)
- # clojurescript (39)
- # community-development (1)
- # conjure (43)
- # cursive (37)
- # data-science (1)
- # datomic (3)
- # duct (16)
- # figwheel-main (23)
- # fulcro (3)
- # instaparse (5)
- # java (5)
- # jobs (1)
- # jobs-discuss (1)
- # malli (11)
- # off-topic (27)
- # re-frame (32)
- # reagent (5)
- # reitit (2)
- # rum (15)
- # shadow-cljs (24)
- # spacemacs (7)
- # sql (5)
- # test-check (3)
- # tools-deps (5)
Hi all - I’ve been playing with strings in a babashka REPL and ran into a `java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn` error. Can anyone help me understand what I’m doing wrong here? Here’s the repl output:
roch=> (def raw-date "20200201")
roch=> (def year (subs raw-date 0 4))
roch=> (def month (subs raw-date 4 6))
roch=> (def day (subs raw-date 6 8))
roch=> (pr (str year "-" month "-" day))
roch=> java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn [at line 67, column 93]
@alex-eberts can't reproduce, which version are you using? if I can create a repro using version 0.1.3
that would be helpful
@alex-eberts have you redefined str
to be a string?. Just eval str
. What does that show? And what about evaling just pr
?
@retrogradeorbit @borkdude Thanks for the hint! That turned out to be the problem… I must have redefined src
previously in the repl session…. <facepalm>. Thanks!