How can I make a result of expand_derivative() callable

Hello, good evening.
Im solving some differentiation and I dont know how to make a result from expand_derivative function from Symbolics callable. This will enhance my workflow. Is there a way to do?

	@variables t
	i = 10-10ℯ^-2t
	Dt = Differential(t)
	current = Dt(i)
	@info current
	dft = expand_derivatives(current)
	@info dft # ******************* make dft callable
	The result is $(20ℯ^-2) mA

maybe something like

julia> dft = expand_derivatives(current)

julia> dft_function = eval(build_function(dft, t))
#5 (generic function with 1 method)

julia> result = dft_function(1.0)  # t = 1.0

julia> println("The result is $(result) mA")
The result is 2.706705664732254 mA

1 Like

Hello. Thank you. Its a pretty neat solution.