<commit_before>//
//  Once.swift
//  Eki
//
//  Created by <NAME> on 20/10/2014.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Foundation

/**
A token to be initilized and stored for use with once().
*/
public final class OnceToken {
    internal var dispatchToken = dispatch_once_t(0)
}

/**
Execute a block once and only once.
*/
public func once(token:OnceToken, block:() -> Void) {
    dispatch_once(&token.dispatchToken,block)
}
<commit_msg>FIX: Add a public initializer for token<commit_after>//
//  Once.swift
//  Eki
//
//  Created by <NAME> on 20/10/2014.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Foundation

/**
A token to be initilized and stored for use with once().
*/
public final class OnceToken {
    internal var dispatchToken = dispatch_once_t(0)
    public init() {
        
    }
}

/**
Execute a block once and only once.
*/
public func once(token:OnceToken, block:() -> Void) {
    dispatch_once(&token.dispatchToken,block)
}

{'fraction_non_alphanumeric': 0.1347517730496454, 'fraction_numerical': 0.02634245187436677, 'mean_word_length': 3.0491803278688523, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '7340154', 'n_tokens_mistral': 342, 'n_tokens_neox': 315, 'n_words': 106}