<commit_before>(defmacro delay (exp)
  `(lambda () ,exp))

(defun force (thunk)
  (funcall thunk))

(defun constant-arg-for-dvl-stream (argument dvl-stream)
  (labels ((do-it (dvl-stream)
             (cons (car dvl-stream)
                   (delay (do-it (funcall (cdr dvl-stream) argument))))))
    (do-it dvl-stream)))

(defun stream-for-each (f stream)
  (cons (funcall f (car stream))
        (delay (stream-for-each f (force (cdr stream))))))

(defun stream-take (count stream)
  (if (= count 0)
      stream
      (stream-take (- count 1) (force (cdr stream)))))

(defun drive (count step)
  (stream-take count (constant-arg-for-dvl-stream 10.0d0 (funcall (__main__) (coerce step 'double-float)))))<commit_msg>Abstract the timestep given to the driven integrator.<commit_after>(defmacro delay (exp)
  `(lambda () ,exp))

(defun force (thunk)
  (funcall thunk))

(defun constant-arg-for-dvl-stream (argument dvl-stream)
  (labels ((do-it (dvl-stream)
             (cons (car dvl-stream)
                   (delay (do-it (funcall (cdr dvl-stream) argument))))))
    (do-it dvl-stream)))

(defun stream-for-each (f stream)
  (cons (funcall f (car stream))
        (delay (stream-for-each f (force (cdr stream))))))

(defun stream-take (count stream)
  (if (= count 0)
      stream
      (stream-take (- count 1) (force (cdr stream)))))

(defun drive (count step dt)
  (stream-take count
   (constant-arg-for-dvl-stream (coerce dt 'double-float)
    (funcall (__main__) (coerce step 'double-float)))))
{'fraction_non_alphanumeric': 0.16345514950166112, 'fraction_numerical': 0.0053156146179402, 'mean_word_length': 3.1717451523545708, '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': '7643621', 'n_tokens_mistral': 547, 'n_tokens_neox': 531, 'n_words': 149}