Last active
October 12, 2016 21:10
-
-
Save knorth55/f8ef91a8657a063e1f7e221631b5db00 to your computer and use it in GitHub Desktop.
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
(defun read-file-into-string (filename) | |
(with-open-file (f filename :direction :input) | |
(let (buf (str-list nil)) | |
(while (setq buf (read-line f nil)) | |
(setq str-list (append str-list (list (format nil buf))))) | |
(reduce #'(lambda (x y) (concatenate string x y)) str-list)))) | |
(read-file-into-string "sample.json") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment