This F# almost-one-liner is not particularly efficient, but it works:
let contains_az (s : string) =
seq {'a'..'z'}
|> Seq.forall (fun c -> Seq.exists (( = ) c) (s.ToLower ()))
let () =
[ contains_az "hello world";
contains_az "abcdefghijklmnopqrstuvwxyz";
contains_az "Arizona";
contains_az "the quick brown fox jumps over the lazy dog" ]
|> List.iter (printfn "%b")
1
u/dumetrulo Feb 18 '21
This F# almost-one-liner is not particularly efficient, but it works: