<commit_before># A Slip is a kind of List that is immediately incorporated into an iteration
# or another List. Other than that, it's a totally normal List.
my class Slip {
    multi method Slip(Slip:D:) { self }
    method defined () { self.so }
}

# The slip(...) function creates a Slip.
proto slip(|) { * }
multi slip() {
    my \result = Slip.CREATE;
    nqp::bindattr(result, List, '$!reified', BEGIN IterationBuffer.CREATE);
    result
}
multi slip(|) {
    my \result  = Slip.CREATE;
    my \in      = nqp::p6argvmarray();
    my \reified = IterationBuffer.CREATE;
    nqp::bindattr(result, List, '$!reified', reified);
    while nqp::elems(in) {
        if nqp::istype(nqp::atpos(in, 0), Slip) {
            # We saw a Slip, so we'll lazily deal with the rest of the things
            # (as the Slip may expand to something lazy).
            my \todo := List::Reifier.CREATE;
            nqp::bindattr(result, List, '$!todo', todo);
            nqp::bindattr(todo, List::Reifier, '$!reified', reified);
            nqp::bindattr(todo, List::Reifier, '$!future', in);
            nqp::bindattr(todo, List::Reifier, '$!reification-target',
                result.reification-target());
            last;
        }
        else {
            nqp::push(reified, nqp::shift(in));
            Nil # don't Sink the thing above
        }
    }
    result
}

# vim: ft=perl6 expandtab sw=4<commit_msg>delete incorrect, duplicate code<commit_after># A Slip is a kind of List that is immediately incorporated into an iteration
# or another List. Other than that, it's a totally normal List.
my class Slip {
    multi method Slip(Slip:D:) { self }
    method defined () { self.so }
    method CALL-ME (+args) { args.Slip }
}

# The slip(...) function creates a Slip.
proto slip(|) { * }
multi slip() { Empty }
multi slip(+args) { args.Slip }

# vim: ft=perl6 expandtab sw=4
{'fraction_non_alphanumeric': 0.1362179487179487, 'fraction_numerical': 0.003205128205128205, 'mean_word_length': 2.665362035225049, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4286307', 'n_tokens_mistral': 618, 'n_tokens_neox': 603, 'n_words': 192}