]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/While2.scl
Supply SVG text editor with element measurement context
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / While2.scl
1 import "Prelude" hiding (while)
2
3 while :: Maybe Boolean -> Maybe a -> Maybe ()
4 while condM bodyM = mdo
5     cond <- condM
6     if cond 
7     then bodyM >> while condM bodyM
8     else return ()
9
10 main = "FOO"
11 --
12 FOO