From 3822b236797f416ab621b240c88456b202d506ad Mon Sep 17 00:00:00 2001 From: CrossNox Date: Sat, 26 Nov 2022 22:58:54 -0300 Subject: [PATCH] fix code --- src/rustint/core.clj | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/rustint/core.clj b/src/rustint/core.clj index 6836fd0..ac1db21 100644 --- a/src/rustint/core.clj +++ b/src/rustint/core.clj @@ -2203,14 +2203,10 @@ ; [10] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defn pasar-a-float [arg] - (if - (string? arg) - ( - try - (reduce #(+ (* 10 %1) %2) (map #(- %1 48) (map int (map char arg)))) - (catch ClassCastException e (arg)) - ) - arg + (cond + (number? arg) (float arg) + (string? arg) (if (re-find #"^-?\d+\.?\d*$" arg) (float (read-string arg)) arg) + :else (arg) ) )