packages feed

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

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