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: docs/reference/egglog-translation.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -531,6 +531,15 @@ The `(print-stats)` command is translated into `egraph.stats()` to get overall s
531
531
egraph.stats()
532
532
```
533
533
534
+
## Function Values
535
+
536
+
The `print-function` command is translated into `egraph.function_values(fn, [length]?)` to get the values of a specific function. Note that the function provided must either return a primitive or be created with a merge function.
537
+
538
+
```{code-cell} python
539
+
# (print-function fib 3)
540
+
egraph.function_values(fib, length=3)
541
+
```
542
+
534
543
## Include
535
544
536
545
The `(include <path>)` command is used to add modularity, by allowing you to pull in the source from another egglog file into the current file.
0 commit comments