mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 20:21:51 -07:00
Use drop 1
instead of reimplementing it in terms of tail
This commit is contained in:
@@ -126,11 +126,9 @@ getCommands = do
|
||||
split :: Eq a => a -> [a] -> [[a]]
|
||||
split _ [] = []
|
||||
split e l =
|
||||
f : split e (rest ls)
|
||||
f : split e (drop 1 ls)
|
||||
where
|
||||
(f,ls) = span (/=e) l
|
||||
rest s | s == [] = []
|
||||
| otherwise = tail s
|
||||
|
||||
escape :: String -> String
|
||||
escape [] = ""
|
||||
|
Reference in New Issue
Block a user