From: Marko Luukkainen Date: Mon, 27 Nov 2017 09:55:53 +0000 (+0200) Subject: Merge "ListUtils.create(WriteGraph, Iterable elements) DelayedWritegraph... X-Git-Tag: v1.31.0~18 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=bdafd889bd2c5c11d6f9036ac791d143b23098e0;hp=f016d40e5f6a2dca277a317188d1bb73b8255118 Merge "ListUtils.create(WriteGraph, Iterable elements) DelayedWritegraph fix" --- diff --git a/bundles/org.simantics.scl.runtime/scl/Prelude.scl b/bundles/org.simantics.scl.runtime/scl/Prelude.scl index c04cc8625..a926ae40e 100644 --- a/bundles/org.simantics.scl.runtime/scl/Prelude.scl +++ b/bundles/org.simantics.scl.runtime/scl/Prelude.scl @@ -1484,6 +1484,14 @@ fst (x,y) = x snd :: (a,b) -> b snd (x,y) = y +@inline +mapFst :: (a -> b) -> (a,c) -> (b,c) +mapFst f (x,y) = (f x, y) + +@inline +mapSnd :: (a -> b) -> (c,a) -> (c,b) +mapSnd f (x,y) = (x, f y) + instance (Ord a, Ord b) => Ord (a, b) where compare (a0, b0) (a1, b1) = compare a0 a1 &<& compare b0 b1