summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/programs/joao-circular/inp
blob: 9f886824793ae6ed739df6a32b419a9ad0d5378e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
int a;
int b;
int c;
int a;


fact (int x) : int
{
  fact = 1;
  while ( x > 0 )
  { fact = fact * x;
    x = x - 1;
  };
};

recfact (int x) : int
{ if ( x == 0) then
   { recfact = 1;}
  else
   { recfact = x * recfact (x - 1); };
};