Clojure- why doesn't this piece of code work in clojure, is there some lazy evaluation gotcha I am missing? -


Working through SCP is new to learning and learning.

I can not find this code to work from SCIP 1.3.1.

What am I missing?

  (defn sum [term a next b] (if (> ab) 0 (+ (word A) (symmetrical post (next one) next b)))) (def- Cubes-new [ab] ((Some cube an inc B)))  

Here is the error message:

  java.lang.Integer clojure.lang .IFn [throwing class java.lang.ClassCastException] can not be molded to restart: 0: [abortion] Return to the top level of mud. Backtrace: 0: user $ sum_cubes_new__2868.invoke (summation.clj: 33) 1: user $ eval__2874.invoke (NO_SOURCE_FILE: 1) 2: clojure.lang.Compiler.eval (Compiler.java:4642) 3: clojure. core $ Avl__5236kinvoke (Korkclj 2017) 4: Swankkcommandskbesik $ Avl_rijn__9l0kinvoke (Besikkclj: 40) 5: Swankkcommandskbesik $ Avl_rijn__9l0kinvoke (Besikkclj: 31) 6: Swank. commands.basic $ eval__930 $ listener_eval__932.invoke (basic.clj: 54) 7: clojure.lang.Var.invoke (Var.java:359) 8: user $ eval__2871.invoke (NO_SOURCE_FILE) 9: clojure.lang.Compiler. Avl (Kmpailrkjawa:4642) 10: Clojrkkor $ Avl__5236kinvoke (Korkclj 2017) 11: Swankkkor $ Avl_in_maks_packej__458kinvoke (Korkclj: 58) 12: Swankkkor $ Avl_for_maks__536kinvoke ( Core.clj: 126) 13: clojure.lang.Var.invoke (Var.java:367) 14: clojure.lang.AFn.applyToHelper (AFn.java:179) 15: clojure.lang.Var.applyTo (Var. java: 476) 16: clojure.core $ apply__4370.invoke (core.clj: 436) 17: swank.core $ eval_from_control__461.invoke (core.clj: 65) 18: swank.core $ eval_loo p__464.invoke (core.clj : 70) 19: swank.core $ spawn_repl_thread__598 $ fn__630 $ fn__632.invoke (core.clj: 179) 20: clojure.lang.AFn.applyToHelper (AFn.java:171) 21: clojure. Langkafnkapplito (Afnkjawa:l64) 22: Clojrkkor $ Aplai__4370kinvoke (Korkclj: 436) 23: Swankkkor $ Span_repl_thred__598 $ Fn__630kdoinvoke (Korkclj: 176) 24: Closure. Lang.RestFn.invoke (RestFn.java:402) 25: clojure.lang.AFn.run (AFn.java:37) 26: java.lang.Thread.run (Thread.Java: 637)   

(def-cubes- new [ab]
( (sum cube An Ink B) ) )

An extra set of feet around the call is trying to evaluate the resulting number as a function.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -