cleaning up show-list function

main
m455 2018-04-09 19:40:47 -04:00
parent c7beb0dfd0
commit bcc3038505
1 changed files with 20 additions and 15 deletions

View File

@ -118,24 +118,29 @@
'no
'("no" "No" "n" "N")))
(define (create-bullets)
(lambda (lst)
(string-append
bullet
" "
lst)))
(define (show-list)
(let ([path
(expand-user-path
(string-append
program-path
program-directory
program-file))])
(let ([todo-items
(file->lines path
#:mode 'text
#:line-mode 'linefeed)])
(let
([path
(expand-user-path
(string-append
program-path
program-directory
program-file))])
(let
([todo-items
(file->lines path
#:mode 'text
#:line-mode 'linefeed)])
(display
(string-join
(map (lambda (lst)
(string-append
bullet
" "
lst))
(map (create-bullets)
todo-items) "\n")))))
(define (add-item-to-file item)