Added more (if-some) utility

master
Brady McDonough 5 years ago
parent fe1b0f5b24
commit b19a679b86

@ -2,7 +2,8 @@
#:export (flatten
lp&
l&
if-some)
if-some
if-some-else)
#:duplicates (warn-override-core warn ))
(define (flatten-helper lst acc stk)
@ -48,3 +49,7 @@
;; Returns the argument if it isn't #f, otherwise returns the empty list
(define (if-some $cond)
(if $cond $cond '()))
;; Returns the first argument if it isn't #f, otherwise returns the second.
(define (if-some-else $cond $else)
(if $cond $cond $else))

Loading…
Cancel
Save