Skip to content

Update formula.md #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/src/formula.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ true

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

```jldoctest 1
julia> log_term(t::AbstractTerm) = FunctionTerm(log, [t], :(log($(t))))
Expand Down
Loading