You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,9 @@ for `simplify` to work. Other required methods are `gethead` and `isterm`
31
31
32
32
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.
Or `similarterm(t::Type{MyType}, f, args; type=T, metadata=nothing)`.
35
37
36
38
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.
37
39
@@ -54,7 +56,7 @@ rules that may be implemented in the future.
54
56
Suppose you were feeling the temptations of type piracy and wanted to make a quick and dirty
55
57
symbolic library built on top of Julia's `Expr` type, e.g.
56
58
57
-
```julia:piracy1
59
+
```julia
58
60
for f ∈ [:+, :-, :*, :/, :^] #Note, this is type piracy!
0 commit comments