diff --git a/hx.cabal b/hx.cabal
--- a/hx.cabal
+++ b/hx.cabal
@@ -1,5 +1,5 @@
 Name:           hx
-Version:        0.1
+Version:        0.2
 Synopsis:       Utility functions that some may feel are missing from Prelude and base.
 Description:    Utility functions that some may feel are missing from Prelude and base.
                 .
diff --git a/src/Haskell/X.hs b/src/Haskell/X.hs
--- a/src/Haskell/X.hs
+++ b/src/Haskell/X.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE Haskell2010 #-}
+{-# LANGUAGE Haskell2010, FlexibleInstances, OverlappingInstances #-}
 {-# OPTIONS -Wall #-}
 
 module Haskell.X where
@@ -56,4 +56,41 @@
     | x == n = r : tr n r xs
     | otherwise = x : tr n r xs
 tr _ _ [] = []
+
+-- | Counts how many elements there are in a 4 levels deep list.
+count4 :: [[[[a]]]] -> Int
+count4 = sum . map (sum . map (sum . map length))
+
+-- | Counts how many elements there are in a 3 levels deep list.
+count3 :: [[[a]]] -> Int
+count3 = sum . map (sum . map length)
+
+-- | Counts how many elements there are in a 2 levels deep list.
+count2 :: [[a]] -> Int
+count2 = sum . map length
+
+-- | Counts how many elements there are in a 1 level deep list.
+count1 :: [a] -> Int
+count1 = length
+
+-- | Segments the elements of a 3 levels deep list such that
+-- the segments contain at least the specified amount of elements,
+-- without breaking apart any subsegments.
+segment3 :: Int -> [[[a]]] -> [[a]]
+segment3 _    [] = []
+segment3 size as = concatMap concat segment : segment3 size rest
+  where
+    segmentations = zip (inits as) (tails as)
+    (segment, rest) = head $ dropWhile ((< size) . count3 . fst) segmentations
+
+-- | Segments the elements of a 2 levels deep list such that
+-- the segments contain at least the specified amount of elements,
+-- without breaking apart any subsegments.
+segment2 :: Int -> [[a]] -> [[a]]
+segment2 _    [] = []
+segment2 size as = concat segment : segment2 size rest
+  where
+    segmentations = zip (inits as) (tails as)
+    (segment, rest) = head $ dropWhile ((< size) . count2 . fst) segmentations
+
 
