Newer
Older
inria-internship / examples / cons.lambda
(setglobal Cons!
  (let
    (mm/81 =
       (function param/82
         (catch
           (if param/82
             (let (*match*/85 =a (field 0 param/82))
               (if (isout 3 *match*/85) (exit 1)
                 (switch* *match*/85
                  case int 0:
                   (let (*match*/91 =a (field 1 param/82))
                     (if *match*/91
                       (let (*match*/92 =a (field 0 *match*/91))
                         (if (!= *match*/92 0) (exit 1)
                           (let (*match*/93 =a (field 1 *match*/91))
                             (if *match*/93
                               (let (*match*/94 =a (field 0 *match*/93))
                                 (if (!= *match*/94 0) (exit 1)
                                   (let (*match*/95 =a (field 1 *match*/93))
                                     (if *match*/95 (exit 1)
                                       (observe [0: 0 [0: 0 [0: 0 0a]]])))))
                               (exit 1)))))
                       (exit 1)))
                  case int 1:
                   (let (*match*/86 =a (field 1 param/82))
                     (if *match*/86
                       (let (*match*/87 =a (field 0 *match*/86))
                         (if (!= *match*/87 2) (exit 1)
                           (let (*match*/88 =a (field 1 *match*/86))
                             (if *match*/88
                               (let (*match*/89 =a (field 0 *match*/88))
                                 (if (!= *match*/89 3) (exit 1)
                                   (let (*match*/90 =a (field 1 *match*/88))
                                     (if *match*/90 (exit 1)
                                       (observe [0: 1 [0: 2 [0: 3 0a]]])))))
                               (exit 1)))))
                       (exit 1)))
                  case int 2:
                   (let (*match*/96 =a (field 1 param/82))
                     (if *match*/96
                       (let (*match*/97 =a (field 0 *match*/96))
                         (if (!= *match*/97 2) (exit 1)
                           (let (*match*/98 =a (field 1 *match*/96))
                             (if *match*/98
                               (let (*match*/99 =a (field 0 *match*/98))
                                 (if (!= *match*/99 2) (exit 1)
                                   (let (*match*/100 =a (field 1 *match*/98))
                                     (if *match*/100 (exit 1)
                                       (observe [0: 2 [0: 2 [0: 2 0a]]])))))
                               (exit 1)))))
                       (exit 1)))
                  case int 3:
                   (let (*match*/101 =a (field 1 param/82))
                     (if *match*/101
                       (let (*match*/102 =a (field 0 *match*/101))
                         (if (!= *match*/102 3) (exit 1)
                           (let (*match*/103 =a (field 1 *match*/101))
                             (if *match*/103
                               (let (*match*/104 =a (field 0 *match*/103))
                                 (if (!= *match*/104 3) (exit 1)
                                   (let
                                     (*match*/105 =a (field 1 *match*/103))
                                     (if *match*/105 (exit 1)
                                       (observe [0: 3 [0: 3 [0: 3 0a]]])))))
                               (exit 1)))))
                       (exit 1))))))
             (exit 1))
          with (1) (observe 0a))))
    (makeblock 0 mm/81)))