]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/scl/Prelude.scl
(refs #7597) Allow side-effects in the function given to indexBy
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Prelude.scl
index 5e5bd858b8b65e2a30210e388fd6de72ef1a747f..6acbf924b1995ea0a082b29931d689bda66b53bb 100644 (file)
@@ -1949,7 +1949,7 @@ importJava "org.simantics.scl.runtime.Lists" where
     Given a list of values and a function computing a key for each value, the function produces a function that finds a value
     effeciently for the given key.
     """
-    indexBy ::  (a -> b) -> [a] -> b -> Maybe a
+    indexBy ::  (a -> <e> b) -> [a] -> <e> (b -> Maybe a)
     
     "Works like `index` but uses the given functions as hash codes and equality."
     indexWith :: (a -> Integer) -> (a -> a -> Boolean) -> [(a,b)] -> a -> Maybe b