From 49b4cf05fba4aff0ca8de92f274bfc5c4752f5e2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 4 Aug 2022 09:48:48 -0400 Subject: Add wutbar glyph and use it --- Alpha.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Alpha.hs') 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') -- cgit v1.2.3