module Language.Haskell.HsColour.General(
    dropLast, dropFirst
    ) where


dropLast :: Eq a => a -> [a] -> [a]
dropLast :: forall a. Eq a => a -> [a] -> [a]
dropLast a
x [a
y] | a
x forall a. Eq a => a -> a -> Bool
== a
y = []
dropLast a
x (a
y:[a]
ys) = a
y forall a. a -> [a] -> [a]
: forall a. Eq a => a -> [a] -> [a]
dropLast a
x [a]
ys
dropLast a
x [] = []


dropFirst :: Eq a => a -> [a] -> [a]
dropFirst :: forall a. Eq a => a -> [a] -> [a]
dropFirst a
x (a
y:[a]
ys) | a
x forall a. Eq a => a -> a -> Bool
== a
y = [a]
ys
dropFirst a
x [a]
ys = [a]
ys