X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.runtime%2Fscl%2FPrelude.scl;fp=bundles%2Forg.simantics.scl.runtime%2Fscl%2FPrelude.scl;h=6acbf924b1995ea0a082b29931d689bda66b53bb;hp=5e5bd858b8b65e2a30210e388fd6de72ef1a747f;hb=b3bbcce2479bba631466a15bef11581bafa676cc;hpb=db54e4ca935111cfe3574a01bb9be3cf083258cc diff --git a/bundles/org.simantics.scl.runtime/scl/Prelude.scl b/bundles/org.simantics.scl.runtime/scl/Prelude.scl index 5e5bd858b..6acbf924b 100644 --- a/bundles/org.simantics.scl.runtime/scl/Prelude.scl +++ b/bundles/org.simantics.scl.runtime/scl/Prelude.scl @@ -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 -> b) -> [a] -> (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