Sys.Signals module for a Variant type of signals (and a set_signal function that...
[ocaml.git] / testasmcomp / tak.cmm
blobcd61ec89be51241e5d6a0337927d39468ed22cb7
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                           Objective Caml                            *)
4 (*                                                                     *)
5 (*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
6 (*                                                                     *)
7 (*  Copyright 1996 Institut National de Recherche en Informatique et   *)
8 (*  en Automatique.  All rights reserved.  This file is distributed    *)
9 (*  under the terms of the Q Public License version 1.0.               *)
10 (*                                                                     *)
11 (***********************************************************************)
13 (* $Id$ *)
15 (function "tak" (x:int y:int z:int)
16   (if (> x y)
17       (app "tak" (app "tak" (- x 1) y z int)
18                  (app "tak" (- y 1) z x int)
19                  (app "tak" (- z 1) x y int) int)
20       z))
22 (function "takmain" (dummy: int)
23    (app "tak" 18 12 6 int))