From b3bbcce2479bba631466a15bef11581bafa676cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Fri, 3 Nov 2017 17:08:20 +0200 Subject: [PATCH] (refs #7597) Allow side-effects in the function given to indexBy Change-Id: Id1f7f257b4b91dbcb47cea1d0f15350a1956ab17 --- bundles/org.simantics.scl.runtime/scl/Prelude.scl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.43.2