Ad
  • Custom User Avatar

    Failed tests:

    java.lang.NullPointerException at clojure.lang.Symbol.intern(Symbol.java:60) at
    clojure.core$symbol.invoke(core.clj:546) at codewars.util$class_name.invoke(util.clj:20) at
    codewars.util$write_code_BANG_.invoke(util.clj:41) at codewars.runners.java$fn__598.invoke(java.clj:67) at
    clojure.lang.MultiFn.invoke(MultiFn.java:227) at codewars.runners$run.invoke(runners.clj:22) at
    codewars.core$_main$fn__608.invoke(core.clj:30) at clojure.lang.AFn.call(AFn.java:18) at
    java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745) 
    
    
  • Custom User Avatar

    I'd have to compute the end item of the range, which I did not want to do as this is sometimes prone to erros, especially regarding the inclusion of last element, e.g. if c is float.

    Since I'm using xrange I'm not evaluating two lists so this is not much slower.

  • Default User Avatar

    Why would you loop trough a range when you can return a range directly ?