History

docs: with-input-from: fix the wrong function in the example

Sigrid Solveig Haflínudóttir committed 3 months ago

Commit 4abc1b31 parent 6e41c912 files · +2 −2Browse files

Unified · Split

2 files
  1. boot/sl.boot +1 −1
  2. src/system.sl +1 −1
boot/sl.boot+1−1
@@ -522,7 +522,7 @@ group number) "Operations on numbers, mathematical constants." asin "Return the · 521 unmodified lines
522522 (:doc-see . length<) (:doc-see . length>)) void? ((:doc-group . type) (:doc-group . misc) (:doc-see . void)) int? ((:doc-group . type)
523523 (:doc-group . number) (:doc-see . int-valued?)) nanoseconds-monotonic ((:doc-example . "(nanoseconds-monotonic)\n; ↳ #u64(0)\n(nanoseconds-monotonic)\n; ↳ #u64(47840)")
524524 (:doc-group . time) (:doc-see . time-now)) io-discard-buffer ((:doc-group . io)
525−(:doc-see . io-flush) (:doc-see . io-buffer-mode)) with-input-from ((:doc-example . "; read a single expression from a file and print it\n(with-output-to (file \"/tmp/1.txt\" :read)\n (print (read *io-in*))\n (newline))")
525+(:doc-see . io-flush) (:doc-see . io-buffer-mode)) with-input-from ((:doc-example . "; read a single expression from a file and print it\n(with-input-from (file \"/tmp/1.txt\" :read)\n (print (read *io-in*))\n (newline))")
526526 (:doc-group . io) (:doc-see . with-output-to)) *stdout* ((:doc-group . io)
527527 (:doc-see . *stderr*) (:doc-see . *stdin*)) car ((:doc-example . "(car NIL)\n; ↳ NIL") (:doc-example . "(car '(1 2 3))\n; ↳ 1")
528528 (:doc-example . "(car '(1 . 2))\n; ↳ 1") (:doc-group . list) (:doc-group . builtin)) arr ((:doc-example . "(arr 's8 0 1 2)\n; ↳ #arr(s8 0 1 2)")
src/system.sl+1−1
@@ -1732,7 +1732,7 @@ · 1731 unmodified lines
17321732 evaluation.»
17331733 :doc-example
17341734 «; read a single expression from a file and print it
1735− (with-output-to (file "/tmp/1.txt" :read)
1735+ (with-input-from (file "/tmp/1.txt" :read)
17361736 (print (read *io-in*))
17371737 (newline))»
17381738 :doc-group io

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t