now variables can access the global scope
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
|
||||
depth = 9;
|
||||
|
||||
fun fail(p)
|
||||
{
|
||||
if p < depth:
|
||||
fail(p+1, depth, fail);
|
||||
else
|
||||
assert(false);
|
||||
}
|
||||
|
||||
#fail(0);
|
||||
|
||||
fun a()
|
||||
{
|
||||
fun b()
|
||||
{
|
||||
print(depth, '\n');
|
||||
}
|
||||
|
||||
b();
|
||||
}
|
||||
|
||||
a();
|
||||
@@ -1,17 +1,5 @@
|
||||
|
||||
|
||||
l = [1, 2, 3, 4];
|
||||
|
||||
print('The list contains ', count(l), ' items.\n');
|
||||
print('The list is: ', l, '.\n');
|
||||
|
||||
|
||||
fun fail(p, fail)
|
||||
{
|
||||
if p == 5:
|
||||
assert(false);
|
||||
else
|
||||
fail(p+1, fail);
|
||||
}
|
||||
|
||||
fail(0, fail);
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
fun index(req)
|
||||
return {code: 200, 'body': 'Hello, world!'};
|
||||
|
||||
routes = {
|
||||
'/': index,
|
||||
'/groups': list_groups
|
||||
}
|
||||
|
||||
res = serve(8080, routes);
|
||||
Reference in New Issue
Block a user