hoplon / javelin

Spreadsheet-like dataflow programming in ClojureScript.
803 stars 44 forks source link

basic error with javelin-clj #18

Closed davesann closed 9 years ago

davesann commented 9 years ago

Just trying javelin-clj out.

This works

user=> (def a (cell 0))
#'user/a
user=> (def b (cell= (inc a)))
#'user/b
user=> 

user=> [a b]
[#<Atom@4699fe0a: 0> #<Atom@5bb166dd: 1>]
user=> 

user=> (swap! a inc)
1
user=> 

user=> [a b]
[#<Atom@4699fe0a: 1> #<Atom@5bb166dd: 2>]
user=> 

This fails:

user=> (defn start []
  #_=>   (let [a (cell 0)              
  #_=>         b (cell= (inc a))  ]     
  #_=> [a b]))
#'user/start
user=>   

user=> (start)

user=> ClassCastException clojure.lang.Atom cannot be cast to java.lang.Number  clojure.lang.Numbers.inc (Numbers.java:110)

Using

REPL-y 0.3.2, nREPL 0.2.3
Clojure 1.6.0
OpenJDK 64-Bit Server VM 1.7.0_65-b32

[tailrecursion/javelin "3.6.3"]
alandipert commented 9 years ago

Thanks! Added and pushed in release 3.7.2