From f73ac8b148981f8c4c4b5c7c12de764d00e5ddd8 Mon Sep 17 00:00:00 2001 From: Ivan Date: Tue, 20 Feb 2024 10:13:15 +0500 Subject: [PATCH] codewars: solve 'is the string uppercase' challenge --- codewars/ocaml/is-the-string-uppercase/main.ml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 codewars/ocaml/is-the-string-uppercase/main.ml diff --git a/codewars/ocaml/is-the-string-uppercase/main.ml b/codewars/ocaml/is-the-string-uppercase/main.ml new file mode 100644 index 0000000..eeaef81 --- /dev/null +++ b/codewars/ocaml/is-the-string-uppercase/main.ml @@ -0,0 +1,2 @@ +let is_uppercase (s: string): bool = + String.for_all (fun c -> not(c >= 'a' && c <= 'z')) s;;