From 10f72bf376654844e04cf144d24c11c81da6e23a Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Sun, 25 Feb 2024 19:09:38 +0100 Subject: [PATCH] add use of write-lines without port --- docs/docs/scheme-intro/input-output.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/docs/scheme-intro/input-output.md b/docs/docs/scheme-intro/input-output.md index 90b6b75cb..5c472775b 100644 --- a/docs/docs/scheme-intro/input-output.md +++ b/docs/docs/scheme-intro/input-output.md @@ -240,3 +240,17 @@ You can use this with `call-with-output-file`: (read-lines "test-3.scm") ;; ==> ("John Lennon" "Paul McCartney" "Ringo Starr" "George Harrison") ``` + +You can also write to standard output when you omit the port: + +```scheme +(let ((beatles '("John Lennon" + "Paul McCartney" + "Ringo Starr" + "George Harrison"))) + (write-lines beatles)) +;; ==> John Lennon +;; ==> Paul McCartney +;; ==> Ringo Starr +;; ==> George Harrison +```