]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Map1.scl
Merge commit 'd1a82fe'
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Map1.scl
1 data List a = Nil | Cons a (List a)\r
2 \r
3 map f Nil = Nil\r
4 map f (Cons h t) = Cons (f h) (map f t)\r
5 \r
6 map2 f l = run l\r
7   where\r
8     run Nil = Nil\r
9     run (Cons h t) = Cons (f h) (run t)\r
10 \r
11 map3 f l = run l\r
12   where\r
13     run Nil = Nil\r
14     run (Cons h t) = Cons (f h) (map f t)\r
15     \r
16 main = "Foo"\r
17 --\r
18 Foo