Sha256: cad9fe4c1dc99a54792f0cc00fa7cdad843d26259247ff75da827dd31d4071f5
Contents?: true
Size: 479 Bytes
Versions: 265
Compression:
Stored size: 479 Bytes
Contents
defmodule Pangram do @doc """ Determines if a word or sentence is a pangram. A pangram is a sentence using every letter of the alphabet at least once. Returns a boolean. ## Examples iex> Pangram.pangram?("the quick brown fox jumps over the lazy dog") true """ @spec pangram?(String.t) :: boolean def pangram?(sentence) do chars = sentence |> String.downcase |> to_char_list Enum.all? ?a..?z, &(&1 in chars) end end
Version data entries
265 entries across 265 versions & 1 rubygems