cleaning up show-list function
This commit is contained in:
		
							parent
							
								
									c7beb0dfd0
								
							
						
					
					
						commit
						bcc3038505
					
				
							
								
								
									
										19
									
								
								rodo.rkt
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								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  | ||||||
|  |     ([path | ||||||
|        (expand-user-path |        (expand-user-path | ||||||
|          (string-append |          (string-append | ||||||
|            program-path |            program-path | ||||||
|            program-directory |            program-directory | ||||||
|            program-file))]) |            program-file))]) | ||||||
|     (let ([todo-items  |     (let  | ||||||
|  |       ([todo-items  | ||||||
|          (file->lines path |          (file->lines path | ||||||
|                       #:mode 'text |                       #:mode 'text | ||||||
|                       #:line-mode 'linefeed)]) |                       #: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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user