You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I get a number from e.g. Ring request I'd like to coerce it to Big Decimal.
(s/def::amount (s/and decimal? pos?))
(sc/coerce::amount"") ;; throws java.lang.ArrayIndexOutOfBoundsException;; but I expect to get "", because the value is not possible to coerce
(sc/coerce::amount1) ;; it returns 1;; but I expect to get 1M, because the value is Long
So I suggest to:
parse-decimal function should not care if x is string or not.
parse-decimal should be wrapped in try-catch.
What do you think about it?
The text was updated successfully, but these errors were encountered:
Hi,
thank you for this library.
When I get a number from e.g. Ring request I'd like to coerce it to Big Decimal.
So I suggest to:
parse-decimal
function should not care ifx
isstring
or not.parse-decimal
should be wrapped intry-catch
.What do you think about it?
The text was updated successfully, but these errors were encountered: