Paste number 70132: read-file

Index of paste annotations: 2 | 1

Paste number 70132: read-file
Pasted by: blink-left
When:3 years, 6 months ago
Share:Tweet this! | http://paste.lisp.org/+1I44
Channel:#dylan
Paste contents:
Raw Source | XML | Display As
define method read-file(path)
  with-open-file(file = path)
    let words = read-to-end(file);
    words;
  end;
end;

Annotations for this paste:

Annotation number 2: library.dylan
Pasted by: blink-left
When:3 years, 6 months ago
Share:Tweet this! | http://paste.lisp.org/+1I44/2
Paste contents:
Raw Source | Display As
module: dylan-user

define library norvig
  use system;
  use functional-dylan;
  use io;
end;

define module norvig
  use file-system;
  use streams;
  use format-out;
end;

Annotation number 1: read-file
Pasted by: blink-left
When:3 years, 6 months ago
Share:Tweet this! | http://paste.lisp.org/+1I44/1
Paste contents:
Raw Source | Display As
module: norvig

format-out(read-file("big.txt"));

Colorize as:
Show Line Numbers
Index of paste annotations: 2 | 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.