How do I perform Type Conversion in Clojure? -


How do I change the string, integer to float and other similar types of conversions in the closure?

You can tell the compiler how to add it, by adding metadata for it.
It can do some actions faster and help eliminate the reflection ^ Icon syntax is sugar which adds to the metadata for later.

  (defn my-function [^ String my-string] .....  

Symbols of the string:

  
  (int 4922354) (Double 42) (byte 254) (four 20) etc ...  

Information for more:


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -