<commit_before>(define-library (srfi 17)

  (import (except (scheme base) set!)
          (rename (prefix (only (scheme base) set!) %))
          (picrin dictionary)
          (picrin attribute)
          (srfi 1)
          (srfi 8))
  
  (define-syntax set!
    (syntax-rules ()
      ((_ (proc args ...) val)
       ((setter proc) args ... val))
      ((_ var val)
       (%set! var val))))

  (define setter
    (letrec ((setter
              (lambda (proc)
                (receive (setter exists) (dictionary-ref (attribute proc)
                                                         'setter)
                  (if exists
                      setter
                      (error "No setter found")))))
             (set-setter!
              (lambda (proc setter)
                (dictionary-set! (attribute proc) 'setter setter))))
      (set-setter! setter set-setter!)
      setter))

  (define (getter-with-setter get set)
    (let ((proc (lambda args (apply get args))))
      (set! (setter proc) set)<commit_msg>fixes small mistakes<commit_after>(define-library (srfi 17)

  (import (except (scheme base) set!)
          (prefix (only (scheme base) set!) %)
          (picrin dictionary)
          (picrin attribute)
          (srfi 1)
          (srfi 8))
  
  (define-syntax set!
    (syntax-rules ()
      ((_ (proc args ...) val)
       ((setter proc) args ... val))
      ((_ var val)
       (%set! var val))))

  (define setter
    (letrec ((setter
              (lambda (proc)
                (receive (setter exists) (dictionary-ref (attribute proc)
                                                         '@@setter)
                  (if exists
                      setter
                      (error "No setter found")))))
             (set-setter!
              (lambda (proc setter)
                (dictionary-set! (attribute proc) 'setter setter))))
      (set-setter! setter set-setter!)
      setter))

  (define (getter-with-setter get set)
    (let ((proc (lambda args (apply get args))))
      (set! (setter proc) set)
{'fraction_non_alphanumeric': 0.12950340798442064, 'fraction_numerical': 0.0038948393378773127, 'mean_word_length': 1.4522673031026252, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1412310', 'n_tokens_mistral': 605, 'n_tokens_neox': 567, 'n_words': 170}