Skip to content

Commit 2476401

Browse files
authored
Update formula.md (#317)
added qualifier to programmatically constructing formulas
1 parent 1b1fcd6 commit 2476401

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/src/formula.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,10 @@ true
335335

336336
It is also possible to create a `FunctionTerm` programmatically, matching the
337337
behavior of what happens when a call to a function like `log` is encountered
338-
inside the `@formula` macro, although it takes a bit of care to get right. In
339-
the future we may add more convenience methods to "lift" functions into the
340-
"term domain" but for now they must be constructed manually, like so:
338+
inside the `@formula` macro. Functions with unambiguous method dispatch (in particular:
339+
functions with a single input argument) can be constructed manually as follows; functions
340+
with multiple input arguments, or otherwise more complicated method dispatch,
341+
require a different approach which is explained in the [extensions section](@ref Internals-and-extending-the-formula-DSL).
341342

342343
```jldoctest 1
343344
julia> log_term(t::AbstractTerm) = FunctionTerm(log, [t], :(log($(t))))

0 commit comments

Comments
 (0)