<commit_before>//
//  Then.swift
//  ZamzamKit
//
//  Created by <NAME> on 4/29/17.
//  Copyright © 2017 Zamzam. All rights reserved.
//

import Foundation

public protocol With {}

public extension With where Self: Any {

    /// Makes it available to set properties with closures just after initializing.
    ///
    ///     let label = UILabel().with {
    ///       $0.textAlignment = .center
    ///       $0.textColor = UIColor.black
    ///       $0.text = "Hello, World!"
    ///     }
    func with(_ block: (Self) -> Void) -> Self {
        // https://github.com/devxoul/Then
        block(self)
        return self
    }
}

extension NSObject: With {}<commit_msg>All `with` function to only modify without returning anything<commit_after>//
//  Then.swift
//  ZamzamKit
//
//  Created by <NAME> on 4/29/17.
//  Copyright © 2017 Zamzam. All rights reserved.
//

import Foundation

public protocol With {}

public extension With where Self: Any {

    /// Makes it available to set properties with closures just after initializing.
    ///
    ///     let label = UILabel().with {
    ///       $0.textAlignment = .center
    ///       $0.textColor = UIColor.black
    ///       $0.text = "Hello, World!"
    ///     }
    @discardableResult
    func with(_ block: (Self) -> Void) -> Self {
        // https://github.com/devxoul/Then
        block(self)
        return self
    }
}

extension NSObject: With {}
{'fraction_non_alphanumeric': 0.14023960535588442, 'fraction_numerical': 0.016913319238900635, 'mean_word_length': 1.886178861788618, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '2733237', 'n_tokens_mistral': 456, 'n_tokens_neox': 431, 'n_words': 129}