Skip to content

Commit a4078ed

Browse files
Merge pull request #294 from egraphs-good/saulshanabrook-patch-3
Update egglog-translation.md
2 parents d38a8b0 + fba0613 commit a4078ed

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/reference/egglog-translation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,11 @@ The `function` decorator supports a number of options as well, which can be pass
108108

109109
- `egg_fn`: The name of the function in egglog. By default, this is the same as the Python function name.
110110
- `cost`: The cost of the function. By default, this is 1.
111-
- `default`: A default value for the function. This must be the same type as the return type of the function.
112111
- `merge`: A function to merge the results of the function. This must be a function that takes two arguments of the return type, the old and the new, and returns a single value of the return type.
113-
- `on_merge`: A function to call when the function is merged. This must be a function that takes two arguments of the return type, the old and the new, and a number of actions to take.
114112

115113
```{code-cell} python
116-
# egg: (function foo () i64 :cost 10 :default 0 :merge (max old new))
117-
@function(egg_fn="foo", default=i64(0), cost=10, merge=lambda old, new: old.max(new))
114+
# egg: (function foo () i64 :cost 10 :merge (max old new))
115+
@function(egg_fn="foo", cost=10, merge=lambda old, new: old.max(new))
118116
def my_foo() -> i64:
119117
pass
120118
```

0 commit comments

Comments
 (0)