%% $Id: Combinators.oz,v 1.1 2007/10/29 18:50:47 leavens Exp leavens $ % Example of how to write a module in Oz functor $ import % This section isn't needed for this example System(showInfo show) export s: S k: K define % The S combinator fun {S F} fun {$ G} fun {$ X} {{F X} {G X}} end end end % The K (constant) combinator fun {K C} fun {$ _} C end end end