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

/*
The strict Twice function.

An integer (0) is incremented 65536 times using the higher
order function Twice. The Twice function has a local
strictness annotation which makes it more efficient.

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 400K of free memory is needed.
*/

import StdEnv

Twice::(a -> a) a -> a
Twice f x	#! evalfx = f x
			=  f evalfx

Start::Int
Start = Twice Twice Twice Twice inc 0