Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Read-entire-file/Scheme/read-entire-file-1.ss
Normal file
8
Task/Read-entire-file/Scheme/read-entire-file-1.ss
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(with-input-from-file "foo.txt"
|
||||
(lambda ()
|
||||
(reverse-list->string
|
||||
(let loop ((char (read-char))
|
||||
(result '()))
|
||||
(if (eof-object? char)
|
||||
result
|
||||
(loop (read-char) (cons char result)))))))
|
||||
1
Task/Read-entire-file/Scheme/read-entire-file-2.ss
Normal file
1
Task/Read-entire-file/Scheme/read-entire-file-2.ss
Normal file
|
|
@ -0,0 +1 @@
|
|||
(with-input-from-file "foo.txt" read-string)
|
||||
2
Task/Read-entire-file/Scheme/read-entire-file-3.ss
Normal file
2
Task/Read-entire-file/Scheme/read-entire-file-3.ss
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(use-modules (ice-9 textual-ports))
|
||||
(call-with-input-file "foo.txt" get-string-all)
|
||||
Loading…
Add table
Add a link
Reference in a new issue