Skip to content

Commit 4d0ff5e

Browse files
author
Alessandro
committed
README
1 parent 96e33d9 commit 4d0ff5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ for `simplify` to work. Other required methods are `gethead` and `isterm`
3131

3232
In addition, the methods for `Base.hash` and `Base.isequal` should also be implemented by the types for the purposes of substitution and equality matching respectively.
3333

34-
#### `similarterm(t::MyType, f, args; type=T, metadata=nothing)`
34+
#### `similarterm(t::MyType, f, args, symtype=T; metadata=nothing)`
3535

36-
Or `similarterm(t::Type{MyType}, f, args; type=T, metadata=nothing)`.
36+
Or `similarterm(t::Type{MyType}, f, args, symtype=T; metadata=nothing)`.
3737

3838
Construct a new term with the operation `f` and arguments `args`, the term should be similar to `t` in type. if `t` is a `SymbolicUtils.Term` object a new Term is created with the same symtype as `t`. If not, the result is computed as `f(args...)`. Defining this method for your term type will reduce any performance loss in performing `f(args...)` (esp. the splatting, and redundant type computation). T is the symtype of the output term. You can use `SymbolicUtils.promote_symtype` to infer this type.
3939

0 commit comments

Comments
 (0)