]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Proc3.scl
(refs #7307) Added features field to SCL module header
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Proc3.scl
1 import "Prelude"
2
3 @private
4 repeat :: Integer -> (() -> <e> a) -> <e> ()
5 repeat n proc = 
6     if n > 0 then do
7         proc ()
8         repeat (n-1) proc
9     else () 
10
11 main = do
12     a = ref 1 
13     repeat 3 (\() -> a := 2)
14     getRef a
15 --
16 2