]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/MaximumBy.scl
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / MaximumBy.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/MaximumBy.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/MaximumBy.scl
deleted file mode 100644 (file)
index c70c9da..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-import "Prelude" hiding (maximumBy)\r
-\r
-maximumBy :: Ord b => (a -> b) -> [a] -> a\r
-maximumBy f = snd . foldl1 maxF . map (\x -> (f x, x))\r
-  where\r
-    maxF (a @ (aV,_)) (b @ (bV,_)) = if aV >= bV then a else b\r
-  \r
-main = maximumBy (`mod` 10) [1::Integer, 14, 23, 9, 14, 67]  \r
---\r
-9
\ No newline at end of file