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.
This should show a comment about inverting the
iffor happy path on the left.