summaryrefslogtreecommitdiff
path: root/Presence
diff options
context:
space:
mode:
Diffstat (limited to 'Presence')
-rw-r--r--Presence/ControlMaybe.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Presence/ControlMaybe.hs b/Presence/ControlMaybe.hs
new file mode 100644
index 00000000..e277df12
--- /dev/null
+++ b/Presence/ControlMaybe.hs
@@ -0,0 +1,10 @@
1module ControlMaybe where
2
3withJust (Just x) f = f x
4withJust Nothing f = return ()
5
6whenJust acn f = do
7 x <- acn
8 withJust x f
9
10