packages feed

funcons-simple-0.1.0.3: tests/Basic/Basic26.fct

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