|
|
|
@ -59,7 +59,7 @@ |
|
|
|
|
'(1 2 3) |
|
|
|
|
((first is-not-empty) '(() (1 2 3)))) |
|
|
|
|
|
|
|
|
|
(define (coalesce-not-empty default) (lambda (value) ((first is-not-empty) (list value default)))) |
|
|
|
|
(define (coalesce-not-empty default-lazy) (lambda (value) (if (null? value) (default-lazy) value))) |
|
|
|
|
|
|
|
|
|
(define (truthy-chaining f) (lambda (value) (if value (f value) #f))) |
|
|
|
|
|
|
|
|
@ -116,7 +116,7 @@ |
|
|
|
|
(null? values) |
|
|
|
|
'(()) |
|
|
|
|
((compose (list |
|
|
|
|
(coalesce-not-empty (f (cdr values))) |
|
|
|
|
(coalesce-not-empty (lambda () (f (cdr values)))) |
|
|
|
|
flat |
|
|
|
|
(filter id) |
|
|
|
|
(map |
|
|
|
|