<commit_before>(define (qsort lst)
  (let ((l (length lst)))
    (if (< l 2)
        lst
        (let* ((pivot (car lst))
               (tail (cdr lst))
               (left (filter (lambda (v) (<= v pivot)) tail))
               (right (filter (lambda (v) (> v pivot)) tail)))
          (append (qsort left)
                  (append (list pivot) (qsort right)))))))

(display (qsort '(1 3 6 5 7 10 8 2)))
(display (qsort '(1 3 3 5 2 1 8 2 1 1 5)))<commit_msg>simplify qsort.mll<commit_after>(define (qsort lst)
  (if (> (length lst) 1)
      (let* ((pivot (car lst))
             (tail (cdr lst))
             (left (filter (lambda (v) (<= v pivot)) tail))
             (right (filter (lambda (v) (> v pivot)) tail)))
        (append (qsort left)
                (append (list pivot) (qsort right))))
      lst))

(display (qsort '(1 3 6 5 7 10 8 2)))
(display (qsort '(1 3 3 5 2 1 8 2 1 1 5)))
{'fraction_non_alphanumeric': 0.17279821627647715, 'fraction_numerical': 0.046822742474916385, 'mean_word_length': 1.9539473684210527, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4779448', 'n_tokens_mistral': 365, 'n_tokens_neox': 311, 'n_words': 123}