]> gerrit.simantics Code Review - simantics/platform.git/blob - scl/While2.scl
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / 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