Automatic Type Conversion in Clojure

https://clojure-diary.gitlab.io/2025/04/27/automatic-type-conversion-in-clojure.html

Code ;; automatic_type_casting.clj 42 (type 42) (type 42.5) (+ 42 42.5) (type (+ 42 42.5)) 42.7M (type 42.7M) (+ 42.5 42.7M) (type (+ 42.5 42.7M)) (type (+ 42 42.0)) (type 994824757458783748579437258798745.278375725925479247582945754M) (type (+...

#clojure #clj #cljs !clojure@lemmy.ml nostr:nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqc2hs02fnhmdhv2akdeg67srjx80f98tuk3zhd33n5nh2lmrkfzvqrjmlpl

Reply to this note

Please Login to reply.

Discussion

test:

``` clojure

;; automatic_type_casting.clj

42

(type 42)

(type 42.5)

(+ 42 42.5)

(type (+ 42 42.5))

42.7M

(type 42.7M)

(+ 42.5 42.7M)

(type (+ 42.5 42.7M))

(type (+ 42 42.0))

(type 994824757458783748579437258798745.278375725925479247582945754M)

(type (+...

```