<commit_before>abstract class Array<Element>() 
        extends Object()
        satisfies List<Element> & 
                  FixedSized<Element> &
                  Cloneable<Array<Element>> &
                  Ranged<Integer, Array<Element>> {
    
    shared formal void setItem(Integer index, Element element);
    
    shared actual Boolean equals(Object that) {
        //TODO: copy/pasted from List
        if (is List<Object> that) {
            if (that.size==size) {
                for (i in 0..size-1) {
                    value x = this[i];
                    value y = that[i];
                    if (!exists x && !exists y) {
                        continue;
                    }
                    if (is Object x) {
                        if (is Object y) {
                            if (x==y) {
                                continue;
                            }
                        }
                    }
                    return false;
                }
                else {
                    return true;
                }
            }
        }
        return false;
    }
    
    shared actual Integer hash {
        //TODO: copy/pasted from List
        return size;
    }
    
}

Array<Element> array<Element>(Element... elements) { throw; }
Array<Element>&None<Element> arrayOfNone<Element>() { throw; }
Array<Element>&Some<Element> arrayOfSome<Element>(Sequence<Element> elements) { throw; }<commit_msg>make Array shared<commit_after>shared abstract class Array<Element>() 
        extends Object()
        satisfies List<Element> & 
                  FixedSized<Element> &
                  Cloneable<Array<Element>> &
                  Ranged<Integer, Array<Element>> {
    
    shared formal void setItem(Integer index, Element element);
    
    shared actual Boolean equals(Object that) {
        //TODO: copy/pasted from List
        if (is List<Object> that) {
            if (that.size==size) {
                for (i in 0..size-1) {
                    value x = this[i];
                    value y = that[i];
                    if (!exists x && !exists y) {
                        continue;
                    }
                    if (is Object x) {
                        if (is Object y) {
                            if (x==y) {
                                continue;
                            }
                        }
                    }
                    return false;
                }
                else {
                    return true;
                }
            }
        }
        return false;
    }
    
    shared actual Integer hash {
        //TODO: copy/pasted from List
        return size;
    }
    
}

shared Array<Element> array<Element>(Element... elements) { throw; }
shared Array<Element>&None<Element> arrayOfNone<Element>() { throw; }
shared Array<Element>&Some<Element> arrayOfSome<Element>(Sequence<Element> elements) { throw; }
{'fraction_non_alphanumeric': 0.09578804347826086, 'fraction_numerical': 0.001358695652173913, 'mean_word_length': 1.084217975937721, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '4989778', 'n_tokens_mistral': 743, 'n_tokens_neox': 702, 'n_words': 182}