packages feed

funcons-simple-0.1.0.3: tests/Kexceptions/Kexceptions10.fct

initialise-binding initialise-storing initialise-giving finalise-failing finalise-throwing scope
  (collateral (bind
    ("x",
     allocate-variable (values)),
  bind
    ("main",
     allocate-variable (functions
       (tuples ((values)*),
        values)))),
   sequential (null,
   assign
     (bound ("main"),
      function closure (scope
        (match
          (given,
           tuple ()),
         handle-return (sequential
           (effect (give
             (decimal-natural ("5"),
              sequential
                (assign
                  (bound ("x"),
                   given),
                 given))),
            handle-thrown
              (sequential
                (throw (decimal-natural ("3")),
                 print (assigned (bound ("x")))),
               scope
                 (bind
                   ("y",
                    allocate-initialised-variable
                      (values,
                       given)),
                  print (assigned (bound ("y")),
                  "\n")))))))),
   apply
     (assigned (bound ("main")),
      tuple ())))