% Standalone module, file names "MyList.oz" % Compile with "ozc -c MyList.oz" (produces MyList.ozf) functor $ export append:Append length:Length define fun {Append Xs Ys} case Xs of nil then Ys [] X|Xr then X|{Append Xr Ys} end end fun {Length Xs} case Xs of nil then 0 [] X|Xr then 1+{Length Xr} end end end