cleaning up show-list function
parent
c7beb0dfd0
commit
bcc3038505
19
rodo.rkt
19
rodo.rkt
|
@ -118,24 +118,29 @@
|
|||
'no
|
||||
'("no" "No" "n" "N")))
|
||||
|
||||
(define (create-bullets)
|
||||
(lambda (lst)
|
||||
(string-append
|
||||
bullet
|
||||
" "
|
||||
lst)))
|
||||
|
||||
(define (show-list)
|
||||
(let ([path
|
||||
(let
|
||||
([path
|
||||
(expand-user-path
|
||||
(string-append
|
||||
program-path
|
||||
program-directory
|
||||
program-file))])
|
||||
(let ([todo-items
|
||||
(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)
|
||||
|
|
Loading…
Reference in New Issue