typing
[minfp.git] / tests / preamble.mfp
index 120f93f..e219460 100644 (file)
@@ -1,9 +1,17 @@
+//Function application
 $ ifxr 0 x y = x y;
+//Reverse function application
 & ifxr 0 x y = y x;
+
+//Arithmetic operators
 == ifxl 7 = code eq;
 * ifxl 7 = code mul;
 - ifxl 6 = code sub;
 + ifxl 6 = code add;
+
+//Conditional operators
 if = code if;
-fac i = if (i == 0) 1 (i * fac (i - 1));
+
+fac i = if (i == 0) 1 $ i * fac (i - 1);
+id x = x;
 start = fac 10;