summaryrefslogtreecommitdiff
path: root/Alpha.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Alpha.hs')
-rw-r--r--Alpha.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Alpha.hs b/Alpha.hs
index 619973c..6cc9b18 100644
--- a/Alpha.hs
+++ b/Alpha.hs
@@ -54,6 +54,7 @@ module Alpha
(?:),
(?.),
(?+),
+ (?|),
-- * Text
str,
@@ -187,6 +188,10 @@ _ ?+ [] = panic "wutlus: empty cond list"
(?<) :: Bool -> (Bool -> Text -> a) -> Text -> a
a ?< f = if not a then f a else panic "wutgal failed"
+-- | When. wutbar
+(?|) :: Applicative f => Bool -> f () -> f ()
+a ?| f = when a f
+
-- | Removes newlinse from a string.
strip :: String -> String
strip = filter (/= '\n')