From 2a293ea594bdaa652bbd0d8271f56ead806c4cbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Wed, 7 Feb 2018 14:20:34 +0200 Subject: [PATCH] (refs #7751) Added orElseM Change-Id: I365c89a1d4ad60b1763854b6d6cd0a3a94e1ab49 --- bundles/org.simantics.scl.runtime/scl/Prelude.scl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bundles/org.simantics.scl.runtime/scl/Prelude.scl b/bundles/org.simantics.scl.runtime/scl/Prelude.scl index 7e558bdc4..2be6ed745 100644 --- a/bundles/org.simantics.scl.runtime/scl/Prelude.scl +++ b/bundles/org.simantics.scl.runtime/scl/Prelude.scl @@ -1305,6 +1305,11 @@ orElse :: Maybe a -> ( a) -> a orElse (Just x) _ = x orElse Nothing def = def +@inline +orElseM :: Maybe a -> ( Maybe a) -> Maybe a +orElseM mx@(Just x) _ = mx +orElseM Nothing def = def + /// Either /// """ -- 2.47.1