/* Pangram checker in Picat. http://rosettacode.org/wiki/Pangram_checker """ Write a function or method to check a sentence to see if it is a pangram or not and show its use. A pangram is a sentence that contains all the letters of the English alphabet at least once, for example: The quick brown fox jumps over the lazy dog. """ Model created by Hakan Kjellerstrand, hakank@gmail.com See also my Picat page: http://www.hakank.org/picat/ */ main => go. go => S1 = "The quick brown fox jumps over the lazy dog", println([S1, is_pangram(S1)]), S2 = "The slow brown fox jumps over the lazy dog", println([S2, is_pangram(S2)]), nl. is_pangram(S) = C => Lower = S.to_lowercase, Alpha = [chr(I+96) : I in 1..26], foreach(A in Alpha) membchk(A,Lower) end -> C = 1 ; C = 0.