56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
# Isogram
|
|
|
|
Determine if a word or phrase is an isogram.
|
|
|
|
An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times.
|
|
|
|
Examples of isograms:
|
|
|
|
- lumberjacks
|
|
- background
|
|
- downstream
|
|
- six-year-old
|
|
|
|
The word *isograms*, however, is not an isogram, because the s repeats.
|
|
|
|
## Running tests
|
|
|
|
Execute the tests with:
|
|
|
|
```bash
|
|
$ elixir isogram_test.exs
|
|
```
|
|
|
|
### Pending tests
|
|
|
|
In the test suites, all but the first test have been skipped.
|
|
|
|
Once you get a test passing, you can unskip the next one by
|
|
commenting out the relevant `@tag :pending` with a `#` symbol.
|
|
|
|
For example:
|
|
|
|
```elixir
|
|
# @tag :pending
|
|
test "shouting" do
|
|
assert Bob.hey("WATCH OUT!") == "Whoa, chill out!"
|
|
end
|
|
```
|
|
|
|
Or, you can enable all the tests by commenting out the
|
|
`ExUnit.configure` line in the test suite.
|
|
|
|
```elixir
|
|
# ExUnit.configure exclude: :pending, trace: true
|
|
```
|
|
|
|
For more detailed information about the Elixir track, please
|
|
see the [help page](http://exercism.io/languages/elixir).
|
|
|
|
## Source
|
|
|
|
Wikipedia [https://en.wikipedia.org/wiki/Isogram](https://en.wikipedia.org/wiki/Isogram)
|
|
|
|
## Submitting Incomplete Solutions
|
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|