isogram: "invert if" case not caught
Open
- Dominant language
- Go
- Stars
- 33
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
```go
package isogram
import "unicode"
// IsIsogram takes a string as input and decides whether it's an isogram or not
func IsIsogram(s string) bool {
m := make(map[rune]int, len(s))
for _, r := range s {
if unicode.Is(unicode.Letter, r) {
if _, ok := m[unicode.ToLower(r)]; ok {
return false
}
m[unicode.ToLower(r)]++
}
}
return true
}
```
This should show a comment about inverting the `if` for happy path on the left.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.