my-solutions/codewars/ocaml/fundamentals/is-the-string-uppercase/main.ml

3 lines
95 B
OCaml
Raw Normal View History

let is_uppercase (s: string): bool =
String.for_all (fun c -> not(c >= 'a' && c <= 'z')) s;;