On Mon, Nov 24, 2008 at 7:40 AM, Andrea Vezzosi <sanzhiyan@gmail.com> wrote:
It's more natural to consider the cross product of no sets to be [[]] so your crossr becomes:

crossr [] = [[]]
crossr (x:xs) = concat (map (\h ->map (\t -> h:t) (crossr tail)) hd

Ops, hd and tail should be x and xs here.