Scala, Programming, Functional Programming, Type Safety.
following code from Gabriel Volpe’s book: .coerce[_] method is used to perform safe type casting between two types, useful when you have to extract underlying value from your newtype instance: To add support for Refined types we will only have to add"io.circe" %% “circe-refined" % circeVersion to