Albert Graef wrote:
> /me wrote:
> > To make this thread go totally off-topic, here's the same in Q:
>
> Sorry, I forgot one equation:
>
> intersect Xs [] = [];
> intersect Xs [Y|Ys] = [Y|intersect Xs Ys] if any (=Y) Xs;
> = intersect Xs Ys otherwise;
Ah yeah, like Haskell and Erlang would do it.
I do prefer the Ocaml way :-)
Erik
-- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "Perl as a language has less a design than a thousand special features flying in close formation." -- From the c2 wikiReceived on Sun Feb 26 20:21:49 2006
This archive was generated by hypermail 2.1.8 : Sun Feb 26 2006 - 20:21:49 EET