Skip to content

Commit 098584d

Browse files
Add dynamic cost example
1 parent 3acb4e2 commit 098584d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/web-demo/dynamic-cost.egg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(datatype Math (Var String) (Add Math Math))
2+
(enable-dynamic-cost Var)
3+
(let y (Var "y"))
4+
(let x (Var "x"))
5+
(union x (Add y y))
6+
(set-cost (Var "x") 100)
7+
(extract x)

0 commit comments

Comments
 (0)