{----------------------------------------------------------------}
{--- My attempt at a translation of the Haskell 1.1 ---}
{--- list prelude, "module PreludeList". ---}
{----------------------------------------------------------------}
list a ::= Nil | Cons a (list a);
;;
{--------------------------------------------------------}
{--- Preliminaries ---}
{--------------------------------------------------------}
dot f g x
= f (g x);
any p l
= case l of
Nil -> False;
Cons x xs -> p x | any p xs
end;
elem l
= dot any (\a b -> a == b) l;
{----------------------------------------------------------------}
{--- end preludeList.cor ---}
{----------------------------------------------------------------}