Created
August 16, 2012 17:59
-
-
Save adambard/3372132 to your computer and use it in GitHub Desktop.
There is no such thing as lazy I/O
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Throws an error | |
(with-open [f (RandomAccessFile. "test_file.tmp", "rws")] | |
(map #(.writeInt f %1) (range 1000))) | |
; Runs happily | |
(with-open [f (RandomAccessFile. "test_file.tmp", "rws")] | |
(dorun (map #(.writeInt f %1) (range 1000)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment