init commit again
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding
|
||||
finalise-throwing
|
||||
sequential(
|
||||
handle-thrown(
|
||||
throw 1,
|
||||
catch-else-throw(1, print 1)),
|
||||
handle-thrown(
|
||||
handle-thrown(throw 2,
|
||||
catch-else-throw(1, fail)),
|
||||
catch-else-throw(2, print 2)))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: [1, 2];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
general {
|
||||
funcon-term:
|
||||
finalise-throwing
|
||||
handle-recursively(
|
||||
throw 1,
|
||||
if-true-else(
|
||||
is-less(given,4),
|
||||
sequential(print given, throw integer-add(1,given)),
|
||||
print"OK")
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: [1, 2, 3, "OK"];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
general {
|
||||
funcon-term:
|
||||
finalise-throwing
|
||||
sequential(
|
||||
print handle-thrown(1, fail),
|
||||
handle-thrown(print 2, fail),
|
||||
handle-thrown(
|
||||
sequential(print 3, throw(sequential(print 4, 5))),
|
||||
print given)
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: [1, 2, 3, 4, 5];
|
||||
}
|
||||
Reference in New Issue
Block a user