Sha256: eb61e1a67eac7588e52754af043c217284b4ad824cb6b3d0c9132bdad988653a
Contents?: true
Size: 461 Bytes
Versions: 162
Compression:
Stored size: 461 Bytes
Contents
fun isPangram (input: string): bool = let val counter = Array.tabulate (26, fn _ => 0) val chars = map Char.toLower (String.explode input) val aCode = ord #"a" fun updateCounter c = let val index = ord c - aCode in if index < 0 then () else Array.update (counter, index, (Array.sub (counter, index)) + 1) end in List.app updateCounter chars; Array.all (fn x => x > 0) counter end
Version data entries
162 entries across 162 versions & 1 rubygems