equal
deleted
inserted
replaced
183 |
183 |
184 loc :: B.ByteString -> B.ByteString |
184 loc :: B.ByteString -> B.ByteString |
185 loc = id |
185 loc = id |
186 |
186 |
187 maybeNick :: Maybe ClientInfo -> B.ByteString |
187 maybeNick :: Maybe ClientInfo -> B.ByteString |
188 maybeNick = fromMaybe "[empty]" . liftM nick |
188 maybeNick = fromMaybe "[]" . liftM nick |
|
189 |
|
190 -- borrowed from Data.List, just more general in types |
|
191 deleteBy2 :: (a -> b -> Bool) -> a -> [b] -> [b] |
|
192 deleteBy2 _ _ [] = [] |
|
193 deleteBy2 eq x (y:ys) = if x `eq` y then ys else y : deleteBy2 eq x ys |
|
194 |
|
195 deleteFirstsBy2 :: (a -> b -> Bool) -> [a] -> [b] -> [a] |
|
196 deleteFirstsBy2 eq = foldl (flip (deleteBy2 (flip eq))) |
|
197 |