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