I'm having problems getting the display-lines-to-file working, here is what I have tried:
(define (list-to-file lst file) (display-lines-to-file lst file
                               #:exists 'replace
                               #:separator newline #"\n"))
(list-to-file myList "myfile.txt")
myList is a list of data that was read from another file, after processing that data I need to write the contents of the list (including newline characters) to myfile.txt
                        
Racket keyword arguments have a
#:keywordfollowed by a single value. The problem seems to be:Instead you want:
I'd suggest a few other changes:
#:separatoris already#"\n", omit that.#:mode 'textso that\nis automatically translated to\r\non Windows.Combining all that: