Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4966db0

Browse files
author
Ryan Neufeld
committed
Merge pull request clojure-cookbook#455 from dz-cies/patch2
Minor corrections in 4.09
2 parents 19a137d + dcb5d68 commit 4966db0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

04_local-io/4-09_read-write-files.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Write a string to a file with the built-in +spit+ function:
1313

1414
[source,clojure]
1515
----
16-
(spit "stuff.txt" "my stuff")
16+
(spit "stuff.txt" "all my stuff")
1717
----
1818

1919
Read the contents of a file with the built-in +slurp+ function:
@@ -72,7 +72,7 @@ newline, including the last one:
7272
(defn spitn
7373
"Append to file with newline"
7474
[path text]
75-
(spit path (str text "\n") :append true)
75+
(spit path (str text "\n") :append true))
7676
----
7777

7878
When used with strings, +spit+ and +slurp+ deal with the entire

0 commit comments

Comments
 (0)