Ah. That's pretty funny :)
On Tue, Apr 9, 2013 at 2:48 AM, Jim foo.bar wrote:
> Hey Mark, don't get paranoid :)... this is all Cedric did!
>
> user=> (def .3 0.4)
> #'user/.3
>
> user=> (+ .3 1.7)
> 2.1
>
> Jim
>
>
>
>
> On 09/04/13 10:46, Mark Engelberg wrote:
>
> What version are you running
Technically, this is a user error, since . (dot) is not a valid character
inside user-defined symbols. Clojure does mostly take the stance that it is
a sharp tool and you are allowed to cut yourself, should you really want to.
See http://clojure.org/reader for reference, especially these two sente
In Clojure 1.5.1:
=> (+ .3 1.7)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: .3
in this context, compiling:(NO_SOURCE_PATH:1:1)
So the only way you can do this is if you def'd .3 before
=> (def .3 0.4)
=> (+ .3 1.7)
2.1
On Tuesday, April 9, 2013 10:53:06 AM UTC+2, C
Hey Mark, don't get paranoid :)... this is all Cedric did!
user=> (def .3 0.4)
#'user/.3
user=> (+ .3 1.7)
2.1
Jim
On 09/04/13 10:46, Mark Engelberg wrote:
What version are you running?
As far as I know, .3 isn't even a valid representation for a number --
you'd have to write it as 0.3. S
What version are you running?
As far as I know, .3 isn't even a valid representation for a number --
you'd have to write it as 0.3. So I'm not sure where you're running that
code snippet such that you don't get an immediate error.
On 1.5.1:
=> (+ 0.3 1.7)
2.0
That said, I think most programmer
This may look mildly surprising, and suggests one more thing *not* to ever
do in production code:
user=> (+ .3 1.7)
2.1
user=>
:)
Shouldn't be hard to figure out how to put a repl in a state where that
expression will evaluate to that result. I'm sure mathematicians everywhere
are deeply offende