diff --git a/scripts/prototype.jl b/scripts/prototype.jl new file mode 100644 index 0000000..612c35e --- /dev/null +++ b/scripts/prototype.jl @@ -0,0 +1,14 @@ +density_profile(::Val{:one}, x::Real; a::Real)::Float64 = x + a + +struct DensityProfile{F <: Function} + profile::F + + function DensityProfile(model::Val; pars...) + profile(x::Real)::Float64 = density_profile(model, x; pars...) + new{typeof(profile)}(profile) + end +end + +function (den::DensityProfile{F} where {F <: Function})(x::Real) + den.profile(x)::Float64 +end