From 9951704e3073b9bf923b87b73086c71bd04fec95 Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Tue, 20 Feb 2024 00:44:19 +0500 Subject: [PATCH] codewars: solve 2 problems in ocaml --- codewars/ocaml/function-1-hello-world/main.ml | 2 ++ codewars/ocaml/wilson-prime/main.ml | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 codewars/ocaml/function-1-hello-world/main.ml create mode 100644 codewars/ocaml/wilson-prime/main.ml diff --git a/codewars/ocaml/function-1-hello-world/main.ml b/codewars/ocaml/function-1-hello-world/main.ml new file mode 100644 index 0000000..87c5d09 --- /dev/null +++ b/codewars/ocaml/function-1-hello-world/main.ml @@ -0,0 +1,2 @@ +(* TODO: Write a function `greet ()` that returns "hello world!" *) +let greet () = "hello world!";; diff --git a/codewars/ocaml/wilson-prime/main.ml b/codewars/ocaml/wilson-prime/main.ml new file mode 100644 index 0000000..45672d9 --- /dev/null +++ b/codewars/ocaml/wilson-prime/main.ml @@ -0,0 +1,2 @@ +let am_i_wilson_prime (n: int): bool = + if n == 5 || n == 13 || n == 563 then true else false;;