10 lines
238 B
Elixir
10 lines
238 B
Elixir
|
defmodule Isogram do
|
||
|
@doc """
|
||
|
Determines if a word or sentence is an isogram
|
||
|
"""
|
||
|
@isogram ~r/(\w).*\1/i
|
||
|
|
||
|
@spec isogram?(String.t()) :: boolean
|
||
|
def isogram?(sentence), do: !Regex.match?(@isogram, String.downcase(sentence))
|
||
|
end
|