module Data.List.Tools ( mulLists ) where mulLists :: [[a]] -> [[a]] mulLists [] = [[]] mulLists (xs:xss) = [ x:xs_ | x <- xs, xs_ <- mulLists xss ]