Writing Files in Racket
Here’s the translation of the Go code to Racket, with explanations in Markdown format suitable for Hugo:
Writing files in Racket follows similar patterns to the ones we saw earlier for reading.
Try running the file-writing code:
Then check the contents of the written files:
Next, we’ll look at applying some of the file I/O ideas we’ve just seen to the current-input-port
and current-output-port
streams.