summaryrefslogtreecommitdiff
path: root/tak.icl
blob: 31815d7a50151dffd4d1db10ec72a48e32e28c72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module tak

/*
The Takeuchi function.

To generate an application for this program the Clean 0.8
application should be set to at least 1.1 Mb. To launch the
generated application another 150K of free memory is needed.
*/

import StdClass; // RWS
import StdInt

Tak::Int Int Int -> Int
Tak x y	z | x<=y	=  z
					=  Tak	(Tak (dec x) y z)
							(Tak (dec y) z x)
							(Tak (dec z) x y)

Start::Int
Start = Tak 24 16 8