<commit_before>package m

/**
 * Created by <NAME>.
 */

typealias MFunction = (Any) -> Any

fun mMacro(mMacro: (Expression) -> Expression) = Macro(mMacro)

inline fun <reified I, reified O> mFunction(
        crossinline mFunction: (I) -> O
) = object : (I) -> O {
    override fun invoke(p1: I) = mFunction(p1)
    override fun toString() = "(${I::class.qualifiedName}) -> ${O::class.qualifiedName}"
}

inline fun <reified I1, reified I2, reified O> mFunction(
        crossinline mFunction: (I1, I2) -> O
) = object : (I1) -> (I2) -> O {
    override fun invoke(p1: I1): (I2) -> O = mFunction { i1: I2 -> mFunction(p1, i1) }
    override fun toString() = "(${I1::class.qualifiedName}) -> (${I2::class.qualifiedName}) -> ${O::class.qualifiedName}"
}

interface ConsList<out T : Any> : Iterable<T> {
    val size: Int
    val car: T
    val cdr: ConsList<T>
    operator fun get(i: Int): T
}

object Nil : ConsList<Nothing> {
    override val size = 0
    override fun iterator() = emptyList<Nothing>().iterator()
    override fun get(i: Int) = throw IndexOutOfBoundsException()
    override val car get() = throw IndexOutOfBoundsException()
    override val cdr get() = throw IndexOutOfBoundsException()
    override fun toString() = "nil"
}

class ConsCell<out T : Any>(override val car: T, override val cdr: ConsList<T>) : ConsList<T> {
    override val size get(): Int = (cdr as ConsList<*>).size + 1

    override fun iterator() = object : Iterator<T> {<commit_msg>Change function toString to simpleName<commit_after>package m

/**
 * Created by <NAME>.
 */

typealias MFunction = (Any) -> Any

fun mMacro(mMacro: (Expression) -> Expression) = Macro(mMacro)

inline fun <reified I, reified O> mFunction(
        crossinline mFunction: (I) -> O
) = object : (I) -> O {
    override fun invoke(p1: I) = mFunction(p1)
    override fun toString() = "(${I::class.simpleName}) -> ${O::class.simpleName}"
}

inline fun <reified I1, reified I2, reified O> mFunction(
        crossinline mFunction: (I1, I2) -> O
) = object : (I1) -> (I2) -> O {
    override fun invoke(p1: I1): (I2) -> O = mFunction { i1: I2 -> mFunction(p1, i1) }
    override fun toString() = "(${I1::class.simpleName}) -> (${I2::class.simpleName}) -> ${O::class.simpleName}"
}

interface ConsList<out T : Any> : Iterable<T> {
    val size: Int
    val car: T
    val cdr: ConsList<T>
    operator fun get(i: Int): T
}

object Nil : ConsList<Nothing> {
    override val size = 0
    override fun iterator() = emptyList<Nothing>().iterator()
    override fun get(i: Int) = throw IndexOutOfBoundsException()
    override val car get() = throw IndexOutOfBoundsException()
    override val cdr get() = throw IndexOutOfBoundsException()
    override fun toString() = "nil"
}

class ConsCell<out T : Any>(override val car: T, override val cdr: ConsList<T>) : ConsList<T> {
    override val size get(): Int = (cdr as ConsList<*>).size + 1

    override fun iterator() = object : Iterator<T> {
{'fraction_non_alphanumeric': 0.15582655826558264, 'fraction_numerical': 0.012872628726287264, 'mean_word_length': 3.621283255086072, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 53, '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': '6153348', 'n_tokens_mistral': 1009, 'n_tokens_neox': 1002, 'n_words': 306}