mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 20:51:52 -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 :: Eq a => a -> [a] -> [[a]]
|
||||||
split _ [] = []
|
split _ [] = []
|
||||||
split e l =
|
split e l =
|
||||||
f : split e (rest ls)
|
f : split e (drop 1 ls)
|
||||||
where
|
where
|
||||||
(f,ls) = span (/=e) l
|
(f,ls) = span (/=e) l
|
||||||
rest s | s == [] = []
|
|
||||||
| otherwise = tail s
|
|
||||||
|
|
||||||
escape :: String -> String
|
escape :: String -> String
|
||||||
escape [] = ""
|
escape [] = ""
|
||||||
|
Reference in New Issue
Block a user