Attempting the 99 Haskell problems (well, apparently there is actually only 88 and I have only done 40) to become a better Haskell developer.
isPalindrome :: (Eq a) => [a] -> Bool
isPalindrome lst = all (uncurry (==)) $ zip lst (rev lst)
encode :: Eq a => [a] -> [(Int, [a])]
encode = map (\a -> (length' a, a)) . pack
-- groups the elements of a set into disjoint subsets
group' :: (Eq a) => [Int] -> [a] -> [[[a]]]
group' [] _ = []
group' [_] lst = [[lst]]
group' (d : ds) lst = [c : g | c <- combinations d lst, g <- group' ds (lst \\ c)]
-- generates the combinations of k distinct object from the n elements of a list
combinations :: Int -> [a] -> [[a]]
combinations _ [] = []
combinations n lst@(x : xs)
| n <= 0 = []
| n == 1 = [[a] | a <- lst]
| otherwise = [x : a | a <- combinations (n - 1) xs] ++ combinations n xs
Enjoy, and make sure to try these out yourself! If looking at this hasn't convinced you to start trying to learn Haskell, here is perhaps a better resource. There is a reason behind the relatively recent functional programming fad, which is also something that you should look into. It is not just smug Vim users that want to look cool.