]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Functor.scl
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Functor.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Functor.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Functor.scl
deleted file mode 100644 (file)
index 6bbd359..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-import "JavaBuiltin" as Java\r
-\r
-class Functor f where\r
-    map :: (a -> b) -> f a -> f b\r
-    \r
-data Foo a = Foo a\r
-\r
-instance Functor Foo where\r
-    map f (Foo x) = Foo (f x)\r
-    \r
-instance Functor Maybe where\r
-    map f Nothing = Nothing\r
-    map f (Just x) = Just (f x)\r
-    \r
-data List a = Nil | Cons a (List a)\r
-\r
-instance Functor List where\r
-    map f Nil = Nil\r
-    map f (Cons h t) = Cons (f h) (map f t)\r
-    \r
-main = map (map (Java.iadd 1)) (Cons Nothing (Cons (Just (1 :: Integer)) Nil))\r
---\r
-(Cons null (Cons 2 Nil))
\ No newline at end of file