0
votes

I am learning clojure on tryclj. Why is this not working? It should work based on this.

> (Character/toLowerCase \F)

java.lang.RuntimeException: Unable to resolve symbol: toLowerCase in this context

> (.toLowerCase "FRED")

java.lang.RuntimeException: Unable to resolve symbol: toLowerCase in this context

Update

The problem was the browser. I was using chrome originally. I tried it in IE and firefox and java.lang.RuntimeException: does not appear. I didn't realise the browser would make a difference.

enter image description here

1
the first line is really not working. that should be (Character/toLowerCase \F) - cfrick
I am not sure what you mean @cfrick. I tried that in the REPL and I got the same error. - dwalsh84
well there is something else odd, yet the first line would not work in any case, regardless, that the same (wrong) error message is shown. the second line of code works fine for me (Fx 35ish) - cfrick
I just tried it in internet explorer it works. (the second one works). I was using chrome originally. I didn't realise the browser made a difference. - dwalsh84
@dwalsh84 This is weird, I'm getting the same exception now :(. There's something wrong with TryClj though because even (.toString 1) throws java.lang.RuntimeException: Unable to resolve symbol: toString in this context. - juan.facorro

1 Answers

0
votes

As mentioned in a comment the argument from the first expression should be a Character literal since the function Character/toLowerCase expects a char.

The other expression should work just fine in TryClj, at least it does for me, please see the following screenshot.

enter image description here