<commit_before>-module(example).

-export([is_isogram/1, test_version/0]).

is_isogram(String) ->
    check_isogram(string:to_lower(String)).

check_isogram("") ->
    true;
check_isogram([H|T]) ->
    B = alpha(H) andalso found_in(H, T),
    not B andalso check_isogram(T).

alpha(C_lower) ->
    C_lower /= string:to_upper(C_lower).

found_in(C_lower, S_lower) ->
    lists:any(fun(X) -> X == C_lower end, S_lower).

test_version() -> 1.<commit_msg>isogram: implement feedback<commit_after>-module(example).

-export([is_isogram/1, test_version/0]).

is_isogram(String) ->
    check_isogram(string:to_lower(String)).

check_isogram("") ->
    true;
check_isogram([H|T]) ->
    B = is_alpha(H) andalso is_found_in(H, T),
    not B andalso check_isogram(T).

is_alpha(C) when ($a =< C), (C =< $z) ->
    C /= string:to_upper(C);
is_alpha(_) ->
    false.

is_found_in(C, S) when ($a =< C), (C =< $z) ->
    lists:any(fun(X) -> X == C end, S);
is_found_in(_, _) ->
    false.

test_version() -> 1.
{'fraction_non_alphanumeric': 0.19678714859437751, 'fraction_numerical': 0.006024096385542169, 'mean_word_length': 3.793269230769231, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7128986', 'n_tokens_mistral': 420, 'n_tokens_neox': 415, 'n_words': 73}