This commit is contained in:
2024-07-06 13:42:59 -04:00
parent 0c3373b87e
commit 379e523c04
10 changed files with 271 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
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