Simplify hasExt
This commit is contained in:
parent
dd33a8b252
commit
c5621104df
4
Util.hs
4
Util.hs
@ -32,9 +32,7 @@ getExt fp
|
||||
|
||||
-- |Check if the file has an extension.
|
||||
hasExt :: FilePath -> Bool
|
||||
hasExt fp
|
||||
| (<= 1) . length . splitBy (== '.') $ fp = False
|
||||
| otherwise = True
|
||||
hasExt = (>1) . length . splitBy (== '.')
|
||||
|
||||
|
||||
-- |Split an array into subarrays depending on a given condition.
|
||||
|
Loading…
Reference in New Issue
Block a user