union :: (Eq a) => [RE a] -> RE a
union xs = case length xs' of
  0 -> Epsilon
  1 -> head xs'
  _ -> Union xs'
  where xs' = nub $ filter (/= EmptySet) xs
union :: (Eq a) => [RE a] -> RE a
union xs = case length xs' of
  0 -> Epsilon
  1 -> head xs'
  _ -> Union xs'
  where xs' = nub $ filter (/= EmptySet) xs
union xs = case length xs' of
  0 -> Epsilon
  1 -> head xs'
  _ -> Union xs'
  where xs' = nub $ filter (/= EmptySet) xs