( yesOrNo
, parseYesOrNo
, maybeA
- , defaultTo
, deleteIfEmpty
, formatW3CDateTime
+ , chomp
)
where
(x:_) -> returnA -< Just x
-defaultTo :: ArrowChoice a => b -> a (Maybe b) b
-defaultTo def
- = proc m -> case m of
- Nothing -> returnA -< def
- Just x -> returnA -< x
-
-
deleteIfEmpty :: (ArrowList a, ArrowChoice a) => a String String
deleteIfEmpty
= proc str -> do case str of
show2 :: Int -> String
show2 n | n < 10 = '0':(show n)
- | otherwise = show n
\ No newline at end of file
+ | otherwise = show n
+
+
+chomp :: String -> String
+chomp = reverse . snd . break (/= '\n') . reverse