I don't have Guile installed so I cannot test this, but in Scheme let
does not guarantee any order of evaluation. So my best guess is that count
contains the second line, and l
the first.
Try using let*
instead of let
:
(define (read-two-lines)
(let* ((count (read-line))
(l (read-line)))
(show l)))
For a more thorough explanation see here.