summaryrefslogtreecommitdiffstats
path: root/ocamlbuild/examples/example2/greet.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ocamlbuild/examples/example2/greet.ml')
-rw-r--r--ocamlbuild/examples/example2/greet.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/ocamlbuild/examples/example2/greet.ml b/ocamlbuild/examples/example2/greet.ml
new file mode 100644
index 000000000..ec8088916
--- /dev/null
+++ b/ocamlbuild/examples/example2/greet.ml
@@ -0,0 +1,6 @@
+type how = Nicely | Badly;;
+
+let greet how who =
+ match how with Nicely -> Printf.printf "Hello, %s !\n" who
+ | Badly -> Printf.printf "Oh, here is that %s again.\n" who
+;;