Content deleted Content added
→Example: correction |
|||
Line 46:
box fib
-- type of the output with roles
out (nextn::integer, flag'::integer, result::(integer, integer, string))
-- within 500KB (400KB) -- heap and stack cost boundings (compiler only)
-- woud throw HeapOverflow, StackOverflow
Line 54 ⟶ 56:
match
-- pattern for the tuple of inputs -> expression_with_type_of_the_''out''_tuple
-- * wildcards for unfilled outputs, and unconsumed inputs
(n, 0) -> if n >= 99 then raise EIncredible (n, " reached")
else (n+1, 0, (n, bfibo n, "\n"))
| (n, 1) -> (n, 0, (n, *, " Timeout thrown\n"))
| (n, 2) -> (n, 0, (n, *, " EIncredible thrown\n"))
Line 64 ⟶ 67:
-- exception_pattern -> expression_with_type_of_the_out_tuple
Timeout () -> ( 0, 1, (*, *, "
| EIncredible (n, msg) ->
(0, 2, (*, *, " | EIlegalArgument msg -> (0, 0, (*, *, "
;
Line 84 ⟶ 88:
;
</source>
== External links ==
|