diff --git a/examples/grammar.ipynb b/examples/grammar.ipynb
index 5976938..bce7284 100644
--- a/examples/grammar.ipynb
+++ b/examples/grammar.ipynb
@@ -345,13 +345,13 @@
"\n",
@@ -396,63 +396,21 @@
"metadata": {},
"outputs": [
{
- "data": {
- "image/svg+xml": [
- "\n",
- "\n",
- "\n"
- ],
- "text/plain": [
- "TreeView.LabelledTree({3, 2} directed simple Int64 graph, Any[:*, 8, 4.0])"
- ]
- },
- "execution_count": 12,
- "metadata": {},
- "output_type": "execute_result"
+ "ename": "UndefVarError",
+ "evalue": "UndefVarError: seed1! not defined",
+ "output_type": "error",
+ "traceback": [
+ "UndefVarError: seed1! not defined",
+ "",
+ "Stacktrace:",
+ " [1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13",
+ " [2] top-level scope at In[12]:2"
+ ]
}
],
"source": [
- "srand(100)\n",
+ "using Random\n",
+ "Random.seed1!(100)\n",
"rulenode = rand(RuleNode, grammar, :Real, 10)\n",
"display(rulenode, grammar)"
]
@@ -470,18 +428,22 @@
"metadata": {},
"outputs": [
{
- "data": {
- "text/plain": [
- "32.0"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
+ "ename": "UndefVarError",
+ "evalue": "UndefVarError: f not defined",
+ "output_type": "error",
+ "traceback": [
+ "UndefVarError: f not defined",
+ "",
+ "Stacktrace:",
+ " [1] top-level scope at none:0",
+ " [2] eval(::Module, ::Any) at ./boot.jl:319",
+ " [3] eval(::RuleNode, ::Grammar) at /Users/rlee18/.julia/dev/ExprRules/src/ExprRules.jl:389",
+ " [4] top-level scope at In[13]:1"
+ ]
}
],
"source": [
- "eval(rulenode, grammar)"
+ "Core.eval(rulenode, grammar)"
]
},
{
@@ -499,7 +461,7 @@
{
"data": {
"text/plain": [
- ":(8 * 4.0)"
+ ":(f(B))"
]
},
"execution_count": 14,
@@ -526,7 +488,7 @@
{
"data": {
"text/plain": [
- "2{15,4}"
+ "3{6}"
]
},
"execution_count": 15,
@@ -535,7 +497,7 @@
}
],
"source": [
- "srand(0)\n",
+ "Random.seed!(0)\n",
"sample(rulenode)"
]
},
@@ -554,7 +516,7 @@
{
"data": {
"text/plain": [
- "2{15,4}"
+ "3{6}"
]
},
"execution_count": 16,
@@ -563,7 +525,7 @@
}
],
"source": [
- "srand(3)\n",
+ "Random.seed!(3)\n",
"sample(rulenode, :Real, grammar)"
]
},
@@ -582,7 +544,7 @@
{
"data": {
"text/plain": [
- "ExprRules.NodeLoc(2{15,4}, 1)"
+ "NodeLoc(3{6}, 1)"
]
},
"execution_count": 17,
@@ -591,7 +553,7 @@
}
],
"source": [
- "srand(1)\n",
+ "Random.seed!(1)\n",
"loc = sample(NodeLoc, rulenode)"
]
},
@@ -610,7 +572,7 @@
{
"data": {
"text/plain": [
- "15,"
+ "6,"
]
},
"execution_count": 18,
@@ -638,77 +600,61 @@
"data": {
"image/svg+xml": [
"\n",
- "