foreclojure-android icon indicating copy to clipboard operation
foreclojure-android copied to clipboard

Null pointer @ Problem 92

Open ComedyTomedy opened this issue 4 years ago • 0 comments

The following Roman Numeral decoder (applied here to an argument for testing) works in Replete (repl app), but throws null pointer in 4clojure-android.

((fn [n] (->> n reverse (map #(get {"I" 1, "V" 5, "X" 10, "L" 50, "C" 100, "D" 500, "M" 1000} %)) (cons 0) (partition-all 2 1) (map (fn [[n1 n2]] (if (> n1 n2) (- n2) n2))) (apply +))) "XIV")

ComedyTomedy avatar Oct 30 '19 13:10 ComedyTomedy