-- Carthesian product of two lists
cartProduct :: [a] -> [b] -> [(a, b)]
cartProduct a b =
    let a' = concat $ map (replicate (length b)) a
        b' = concat $ replicate (length a) b
    in  zip a' b'
cartProduct :: [a] -> [b] -> [(a, b)]
cartProduct a b =
    let a' = concat $ map (replicate (length b)) a
        b' = concat $ replicate (length a) b
    in  zip a' b'
cartProduct a b =
    let a' = concat $ map (replicate (length b)) a
        b' = concat $ replicate (length a) b
    in  zip a' b'