cleaning up show-list function
parent
c7beb0dfd0
commit
bcc3038505
35
rodo.rkt
35
rodo.rkt
|
@ -118,24 +118,29 @@
|
||||||
'no
|
'no
|
||||||
'("no" "No" "n" "N")))
|
'("no" "No" "n" "N")))
|
||||||
|
|
||||||
|
(define (create-bullets)
|
||||||
|
(lambda (lst)
|
||||||
|
(string-append
|
||||||
|
bullet
|
||||||
|
" "
|
||||||
|
lst)))
|
||||||
|
|
||||||
(define (show-list)
|
(define (show-list)
|
||||||
(let ([path
|
(let
|
||||||
(expand-user-path
|
([path
|
||||||
(string-append
|
(expand-user-path
|
||||||
program-path
|
(string-append
|
||||||
program-directory
|
program-path
|
||||||
program-file))])
|
program-directory
|
||||||
(let ([todo-items
|
program-file))])
|
||||||
(file->lines path
|
(let
|
||||||
#:mode 'text
|
([todo-items
|
||||||
#:line-mode 'linefeed)])
|
(file->lines path
|
||||||
|
#:mode 'text
|
||||||
|
#:line-mode 'linefeed)])
|
||||||
(display
|
(display
|
||||||
(string-join
|
(string-join
|
||||||
(map (lambda (lst)
|
(map (create-bullets)
|
||||||
(string-append
|
|
||||||
bullet
|
|
||||||
" "
|
|
||||||
lst))
|
|
||||||
todo-items) "\n")))))
|
todo-items) "\n")))))
|
||||||
|
|
||||||
(define (add-item-to-file item)
|
(define (add-item-to-file item)
|
||||||
|
|
Loading…
Reference in New Issue