My initial objective was to create parametric function with struct i.e., function that allow calling like `f{T}(x)`

but julia doesn’t allow parametric function without struct. I want this syntax compare to f(x, ::Type{T}) because i will be calling function into 2 step first will return f{T} and second will call result of first with some val like `(getF(T))(x)`

.

So, I have created singleton struct and then defined the function (outside constructor). But these function return different type the struct. Will these create any problem? My test shows code working properly

```
const tolRational = 1//100
struct ParseRational{T<:Integer} <: Real end
ParseRational(x::N) where {N <: Real} = rationalize(x, tol=tolRational)
ParseRational{T}(x::N) where {T <: Integer, N <: Real} = rationalize(T, x, tol=tolRational)
# Defining get function
getParser(::Type{Rational{T}}) where {T <: Integer} = ParseRational{T}
# call function
getParser(Rational{Int64})(0.1)
```