]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Proc3.scl
Added info on backup location to documentation backup.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / 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