<commit_before>package com.novocode.squery.combinator

trait SimpleFunction[T] extends OperatorColumn[T] {
  val name: String
}

trait SimpleBinaryOperator[T] extends OperatorColumn[T] with BinaryNode {
  val name: String
}

case class CustomFunction[T](name: String)(paramsC: Column[_]*) extends SimpleFunction[T] {
  def nodeChildren = paramsC.map(n => Node(n)).toList
}

case class CustomBinaryOperator[T](name: String)(leftC: Column[_], rightC: Column[_]) extends SimpleBinaryOperator[T] {
  val left = Node(leftC)
  val right = Node(rightC)
}<commit_msg>Improved SimpleFunction and SimpleBinaryOperator (including compatibility with Scala 2.7.5)<commit_after>package com.novocode.squery.combinator

import com.novocode.squery.session.TypeMapper

abstract class SimpleFunction[T](implicit tm: TypeMapper[T]) extends OperatorColumn[T]()(tm) {
  val name: String
}

object SimpleFunction {
  def apply[T](fname: String)(implicit tm: TypeMapper[T]): (Seq[Column[_]] => SimpleFunction[T]) =
    (paramsC: Seq[Column[_]]) =>
      new SimpleFunction[T]()(tm) {
        val name = fname
        def nodeChildren = paramsC.map(n => Node(n)).toList
      }
}

abstract class SimpleBinaryOperator[T](implicit tm: TypeMapper[T]) extends OperatorColumn[T]()(tm) with BinaryNode {
  val name: String
}

object SimpleBinaryOperator {
  def apply[T](fname: String)(implicit tm: TypeMapper[T]): ((Column[_], Column[_]) => SimpleBinaryOperator[T]) =
    (leftC: Column[_], rightC: Column[_]) =>
      new SimpleBinaryOperator[T]()(tm) {
        val name = fname
        val left = Node(leftC)
        val right = Node(rightC)
      }
}
{'fraction_non_alphanumeric': 0.13431916204559458, 'fraction_numerical': 0.0018484288354898336, 'mean_word_length': 4.948717948717949, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7321297', 'n_tokens_mistral': 522, 'n_tokens_neox': 510, 'n_words': 123}