Add a doctest for the flatten function.
-- | Takes a three-dimensional list, and flattens it into a
-- one-dimensional one.
+--
+-- Examples:
+--
+-- >>> flatten [ [[1,2], [3,4]], [[5,6], [7,8]] ]
+-- [1,2,3,4,5,6,7,8]
+--
flatten :: [[[a]]] -> [a]
flatten xs = concat $ concat xs
main :: IO ()
main = do
dt <- docTest ["src/Everything.hs"] ["-isrc"]
- defaultMain $ [dt] -- ++ tests
+ defaultMain $ [dt] ++ tests
-- | Defined so that my test names fit on one line.
tc :: Test.Framework.Providers.API.TestName -> Test.HUnit.Assertion -> Test.Framework.Test