On Mon, Nov 24, 2008 at 7:40 AM, Andrea Vezzosi <span dir="ltr">&lt;<a href="mailto:sanzhiyan@gmail.com">sanzhiyan@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It&#39;s more natural to consider the cross product of no sets to be [[]] so your crossr becomes:<br><br>crossr [] = [[]]<br>crossr (x:xs) = concat (map (\h -&gt;map (\t -&gt; h:t) (crossr tail)) hd</blockquote></div><br>
Ops, hd and tail should be x and xs here.<br>