/* Test our combinator solution */ x : 5; y : (x); /* Should be identity(x) = 5 */ z : (x - 1); /* Should be subtract(x, 1) = 4 */ f : x -> x * 2; result1 : f x; /* Should be apply(f, x) = 10 */ result2 : (f x); /* Should be identity(apply(f, x)) = 10 */ /* Test recursive function */ factorial : n -> when n is 0 then 1 _ then n * (factorial (n - 1)); result3 : factorial 3; /* Print results */ ..out y; ..out z; ..out result1; ..out result2; ..out result3;