<commit_before>module RFunk
  module AttributeFunction
    def fun(definition, &block)
      function_definition = function_definition(definition)
      lambda = -> (*args) { Function.new(self, function_definition, &block).execute(*args) }

      define_method function_definition.value(0).value, &lambda
    end

    [:fn, :func, :defn].each { |m| alias_method m, :fun }

    private

    def function_definition(definition)
      case definition
      when Hash
        return_type = TypeAnnotation.new(definition.values.first.to_s)
        Tuple(definition.keys.first, return_type)
      else
        Tuple(definition, None())
      end
    end
  end
end
<commit_msg>Remove redundant parameter.<commit_after>module RFunk
  module AttributeFunction
    def fun(definition, &block)
      function_definition = function_definition(definition)
      lambda = -> (*args) { Function.new(self, function_definition, &block).execute(*args) }

      define_method function_definition.value(0).value, &lambda
    end

    [:fn, :func, :defn].each { |m| alias_method m, :fun }

    private

    def function_definition(definition)
      case definition
      when Hash
        return_type = TypeAnnotation.new(definition.values.first.to_s)
        Tuple(definition.keys.first, return_type)
      else
        Tuple(definition)
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.09806835066864784, 'fraction_numerical': 0.0014858841010401188, 'mean_word_length': 3.144615384615385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1776047', 'n_tokens_mistral': 393, 'n_tokens_neox': 376, 'n_words': 87}