[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bug w/ internal defines?
Hi all,
MzScheme complains with "define-values: illegal use (not at top-level)
in: (#%define-values (extract-all-results..." on the following
definition:
(define extract-results (lambda (file-port)
(define (extract-all-results file-port current-results)
(let* ((results-regexp (regexp "max = ([0-9]+)"))
(current-line (read-line file-port)))
(cond
((eof-object? current-line) current-results)
(else (let ((match (regexp-match results-regexp current-line)))
(cond
((eq? match #f) (extract-all-results file-port current-results))
(else (extract-all-results file-port
(cons (second match)
current-results)))))))))))
My reading of R5RS and the MzScheme manual suggest this is a legal
definition. I am I right, or do I need more sleep?
Thanks,
Noel
--
Noel Welsh
http://www.dai.ed.ac.uk/~noelw/ noelw@dai.ed.ac.uk