From ed5541ba9a092bd0e51013d58c9aa63fd974128f Mon Sep 17 00:00:00 2001 From: m455 Date: Sat, 7 Apr 2018 10:52:19 -0400 Subject: [PATCH] changed write-to-file to display-to-file, which allows the writing of raw characters instead of strings --- rodo.rkt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rodo.rkt b/rodo.rkt index 230f586..2a96b92 100755 --- a/rodo.rkt +++ b/rodo.rkt @@ -108,7 +108,8 @@ 'no '("no" "No" "n" "N"))) -(define (add-item-to-file item) ;; need to figure out how to add an EOL to each item +(define (add-item-to-file item) + (let ([item (string-append item "\n")]) (let ([path (expand-user-path @@ -116,10 +117,10 @@ program-path program-directory program-file))]) - (write-to-file item + (display-to-file item path #:mode 'text - #:exists 'append))) + #:exists 'append)))) (define (create-file) (let