<commit_before>
var lazyseqs = require('../lib/lazyseq');
var lists = require('../lib/list');

exports['create and consume lazy seq'] = function (test) {
    var n = 1;
    
    var fn = function () {
        return lists.list(n++, lazyseqs.create(fn));
    }
    
    var lseq = lazyseqs.create(fn);
    
    test.ok(lseq);
    
    test.equal(lseq.first(), 1);
    test.equal(lseq.first(), 1);
    test.ok(lseq.next());
    test.equal(lseq.next().first(), 2);
    test.equal(lseq.next().first(), 2);
    test.ok(lseq.next());<commit_msg>lazyseq test minor refactor<commit_after>
const lazyseqs = require('../lib/lazyseq');
const lists = require('../lib/list');

exports['create and consume lazy seq'] = function (test) {
    let n = 1;
    
    const fn = function () {
        return lists.list(n++, lazyseqs.create(fn));
    }
    
    const lseq = lazyseqs.create(fn);
    
    test.ok(lseq);
    
    test.equal(lseq.first(), 1);
    test.equal(lseq.first(), 1);
    test.ok(lseq.next());
    test.equal(lseq.next().first(), 2);
    test.equal(lseq.next().first(), 2);
    test.ok(lseq.next());
{'fraction_non_alphanumeric': 0.19818181818181818, 'fraction_numerical': 0.00909090909090909, 'mean_word_length': 2.7448979591836733, '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': '5032392', 'n_tokens_mistral': 407, 'n_tokens_neox': 394, 'n_words': 76}