<commit_before>#!/usr/bin/perl6

use v6;

module Coro::Simple {
    # receives an arrow block
    sub coro (&block) is export {
	# returns a closure as constructor
	return sub (*@args) {
	    my @yields := gather block @args.flat;
	    my $index   = 0;
	    # so, will returns the generator
	    return -> { @yields[ $index++ ] };
	}
    }

    # yields multiple values, called inside an arrow block
    sub yield (*@args) is export {
	take @args.list if @args;
	take True unless @args;
    }
}

# end of module<commit_msg>Removed some workaround on 'take'...<commit_after>#!/usr/bin/perl6

use v6;

module Coro::Simple {
    # receives an arrow block
    sub coro (&block) is export {
	# returns a closure as constructor
	return sub (*@args) {
	    my @yields := gather block @args.flat;
	    my $index   = 0;
	    # so, will returns the generator
	    return -> { @yields[ $index++ ] };
	}
    }

    # yields multiple values, called inside an arrow block
    sub yield (*@args) is export {
	if @args {
	    take @args.list;
	}
	else {
	    take True;
	}
    }
}

# end of module
{'fraction_non_alphanumeric': 0.12395929694727105, 'fraction_numerical': 0.005550416281221091, 'mean_word_length': 2.5475409836065572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1955486', 'n_tokens_mistral': 382, 'n_tokens_neox': 358, 'n_words': 126}