<commit_before>;; Copyright (c) 2012-2015 <NAME>.  All rights reserved.
;; BSD 3-Clause License: http://opensource.org/licenses/BSD-3-Clause

(define *shen-function-arities* (make-hash-table eq?))

(define (register-function-arity name arity)
  (hash-table-set! *shen-function-arities* name arity))

(define (function-arity name)
  (if (symbol? name)
      (hash-table-ref/default *shen-function-arities* name -1)
      -1))

(define (initialize-arity-table entries)
  (if (null? entries)
      'done
      (let ((name (car entries))
            (arity (cadr entries)))
        (register-function-arity name arity)
        (initialize-arity-table (cddr entries)))))

(initialize-arity-table
 '(abort 0 absvector? 1 absvector 1 adjoin 2 and 2 append 2 arity 1 assoc 2 boolean? 1 cd 1 compile 3 concat 2 cons 2 cons? 1
   cn 2 declare 2 destroy 1 difference 2 do 2 element? 2 empty? 1 enable-type-theory 1 interror 2 eval 1
   eval-kl 1 explode 1 external 1 fail-if 2 fail 0 fix 2 findall 5 freeze 1 fst 1 gensym 1 get 3
   get-time 1 address-> 3 <-address 2 <-vector 2 > 2 >= 2 = 2 hd 1 hdv 1 hdstr 1 head 1 if 3 integer? 1
   intern 1 identical 4 inferences 0 input 1 input+ 2 implementation 0 intersection 2 it 0 kill 0 language 0
   length 1 lineread 1 load 1 < 2 <= 2 vector 1 macroexpand 1 map 2 mapcan 2 maxinferences 1 not 1 nth 2
   n->string 1 number? 1 occurs-check 1 occurrences 2 occurs-check 1 optimise 1 or 2 os 0 package 3 package? 1
   port 0 porters 0 pos 2 print 1 profile 1 profile-results 1 pr 2 ps 1 preclude 1 preclude-all-but 1 protect 1
   address-> 3 put 4 reassemble 2 read-file-as-string 1 read-file 1 read 1 read-byte 1 read-from-string 1
   receive 1 release 0 remove 2 require 3 reverse 1 set 2 simple-error 1 snd 1 specialise 1 spy 1 step 1 stinput 0 stoutput 0<commit_msg>Remove eq? hasher in arity hash table, gauche doesn't like it<commit_after>;; Copyright (c) 2012-2015 <NAME>.  All rights reserved.
;; BSD 3-Clause License: http://opensource.org/licenses/BSD-3-Clause

(define *shen-function-arities* (make-hash-table))

(define (register-function-arity name arity)
  (hash-table-set! *shen-function-arities* name arity))

(define (function-arity name)
  (if (symbol? name)
      (hash-table-ref/default *shen-function-arities* name -1)
      -1))

(define (initialize-arity-table entries)
  (if (null? entries)
      'done
      (let ((name (car entries))
            (arity (cadr entries)))
        (register-function-arity name arity)
        (initialize-arity-table (cddr entries)))))

(initialize-arity-table
 '(abort 0 absvector? 1 absvector 1 adjoin 2 and 2 append 2 arity 1 assoc 2 boolean? 1 cd 1 compile 3 concat 2 cons 2 cons? 1
   cn 2 declare 2 destroy 1 difference 2 do 2 element? 2 empty? 1 enable-type-theory 1 interror 2 eval 1
   eval-kl 1 explode 1 external 1 fail-if 2 fail 0 fix 2 findall 5 freeze 1 fst 1 gensym 1 get 3
   get-time 1 address-> 3 <-address 2 <-vector 2 > 2 >= 2 = 2 hd 1 hdv 1 hdstr 1 head 1 if 3 integer? 1
   intern 1 identical 4 inferences 0 input 1 input+ 2 implementation 0 intersection 2 it 0 kill 0 language 0
   length 1 lineread 1 load 1 < 2 <= 2 vector 1 macroexpand 1 map 2 mapcan 2 maxinferences 1 not 1 nth 2
   n->string 1 number? 1 occurs-check 1 occurrences 2 occurs-check 1 optimise 1 or 2 os 0 package 3 package? 1
   port 0 porters 0 pos 2 print 1 profile 1 profile-results 1 pr 2 ps 1 preclude 1 preclude-all-but 1 protect 1
   address-> 3 put 4 reassemble 2 read-file-as-string 1 read-file 1 read 1 read-byte 1 read-from-string 1
   receive 1 release 0 remove 2 require 3 reverse 1 set 2 simple-error 1 snd 1 specialise 1 spy 1 step 1 stinput 0 stoutput 0
{'fraction_non_alphanumeric': 0.08493150684931507, 'fraction_numerical': 0.06794520547945206, 'mean_word_length': 3.177345537757437, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '4980879', 'n_tokens_mistral': 1386, 'n_tokens_neox': 1129, 'n_words': 558}