command-line.scm 355 B

1234567891011121314
  1. (use-modules (ice-9 textual-ports))
  2. ;; Using the recommended Textual I/O described in:
  3. ;; https://www.gnu.org/software/guile/manual/html_node/Textual-I_002fO.html#Textual-I_002fO
  4. (define (read-line)
  5. (define port (current-input-port))
  6. (get-line port))
  7. (define (write-string string)
  8. (define port (current-output-port))
  9. (put-string port string))