Skip to content

Commit 029c9fc

Browse files
committed
fix typos in Func toexpr docstring
1 parent 22778bb commit 029c9fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/code.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ julia> toexpr(func)
317317
end)
318318
```
319319
320-
- the second argument is a `DestructuredArgs`, in the `Expr` form, it is given a random name, and is expected to receive a vector or tuple of size 2 containing the values of `c` and `y(t)`. The let block that is automatically generated "destructures" these arguments.
320+
- the second argument is a `DestructuredArgs`, in the `Expr` form, it is given a random name, and is expected to receive a vector or tuple of size 2 containing the values of `b` and `y(t)`. The let block that is automatically generated "destructures" these arguments.
321321
- `x(t)` and `y(t)` have been replaced with `var"x(t)"` and `var"y(t)"` symbols throughout
322322
the generated Expr. This makes sure that we are not actually calling the expressions `x(t)` or `y(t)` but instead passing the right values in place of the whole expression.
323323
- `f` is also a function-like symbol, same as `x` and `y`, but since the `args` array contains `f` as itself rather than as say, `f(t)`, it does not become a `var"f(t)"`. The generated function expects a function of one argument to be passed in the position of `f`.
@@ -328,7 +328,7 @@ An example invocation of this function is:
328328
julia> executable = eval(toexpr(func))
329329
#10 (generic function with 1 method)
330330
331-
julia> exec(1, 2.0, [2,3.0], x->string(x); var"z(t)" = sqrt(42))
331+
julia> executable(1, 2.0, [2,3.0], x->string(x); var"z(t)" = sqrt(42))
332332
"11.98074069840786"
333333
```
334334
"""

0 commit comments

Comments
 (0)