<commit_before>module Rize
  module_function

    # Returns a memoized version of a given proc, lambda, or method.
    #
    # @param func [Proc, Lambda, Method] The proc, lambda, or method to memoize.
    # @param expected_call [Fixnum] The number of times to evaluate this function before returning
    #   the memoized value. This value is optional.
    #
    # @return [Lambda] A lambda that is the memoized version of the passed in function.
    # @example Memoize an expensive function.
    #   expensive_lambda = lambda do |arg|
    #     puts "very expensive computation"
    #     arg
    #   end
    #   memoized = Rize.memoize(expensive_lambda)
    #
    #   memoized.call(1)
    #   "very expensive computation"
    #   1
    #   memoized.call(1)
    #   1
    #   memoized.call(2)
    #   "very expensive computation"
    #   2
    #   memoized.call(2)
    #   2
    def memoize(func, expected_call = 1)<commit_msg>Remove useless param for memoize<commit_after>module Rize
  module_function

    # Returns a memoized version of a given proc, lambda, or method.
    #
    # @param func [Proc, Lambda, Method] The proc, lambda, or method to memoize.
    #
    # @return [Lambda] A lambda that is the memoized version of the passed in function.
    # @example Memoize an expensive function.
    #   expensive_lambda = lambda do |arg|
    #     puts "very expensive computation"
    #     arg
    #   end
    #   memoized = Rize.memoize(expensive_lambda)
    #
    #   memoized.call(1)
    #   "very expensive computation"
    #   1
    #   memoized.call(1)
    #   1
    #   memoized.call(2)
    #   "very expensive computation"
    #   2
    #   memoized.call(2)
    #   2
    def memoize(func)
{'fraction_non_alphanumeric': 0.08621700879765395, 'fraction_numerical': 0.00997067448680352, 'mean_word_length': 2.3450980392156864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3705432', 'n_tokens_mistral': 539, 'n_tokens_neox': 544, 'n_words': 171}