1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 21:16:12 +03:00

Define classify in terms of maybeLast.

This commit is contained in:
Rob Rix 2015-12-21 13:15:37 -05:00
parent 2c703b30e4
commit 568df9937b

View File

@ -289,7 +289,7 @@ zipWithMaybe f la lb = take len $ zipWith f la' lb'
lb' = (Just <$> lb) ++ repeat Nothing
classify :: Set.Set Category -> Maybe ClassName
classify = foldr (const . Just . ("category-" ++)) Nothing
classify categories = ("category-" ++) <$> maybeLast categories
actualLines :: String -> [String]
actualLines "" = [""]