LsqFit example

I am working through the initial example in GitHub - JuliaNLSolvers/LsqFit.jl: Simple curve fitting in Julia and don’t know where the function model comes from.

julia> using LsqFit

julia> xdata = range(0, stop=10, length=20);

julia> ydata = model(xdata, [1.0 2.0]) + 0.01*randn(length(xdata));
ERROR: UndefVarError: `model` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
 [1] top-level scope
   @ REPL[7]:1

julia>

Any suggestions?

I didn’t think the line

@. model(x, p) = p[1]*exp(-x*p[2])

above what I typed was pertinent in the example but it is.