-
-
Save fmnoise/16fbbb6b5675c5195c0da1fd47e3d97f to your computer and use it in GitHub Desktop.
Revisions
-
cgrand revised this gist
Jan 8, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ (interpose \newline) (apply str)))) ; The following lines are read (by the reader) as: ; "Look )(\"\\T\na here doc!\n" #=(heredoc)""" Look )("\T -
cgrand revised this gist
Jan 7, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ (interpose \newline) (apply str)))) ; The following lines evaluate to: ; "Look )(\"\\T\na here doc!\n" #=(heredoc)""" Look )("\T -
cgrand created this gist
Jan 7, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ (defn heredoc [] (let [delim (.readLine *in*)] (->> (repeatedly #(.readLine *in*)) (take-while #(not= delim %)) (interpose \newline) (apply str)))) ; The following linkes evaluates to: ; "Look )(\"\\T\na here doc!\n" #=(heredoc)""" Look )("\T a here doc! """