use unsafe-undefined for missing arguments in string-join
This is similar to the recent change of functions with optional values. Using unsafe-undefined instead of a gensym makes it easier to avoid the check of the missing argument.
This commit is contained in:
parent
fd149ca1c0
commit
b9392b2a51
|
@ -19,9 +19,8 @@
|
|||
[(s1 s2 s3 s4 strs) (apply string-append s1 s2 s3 s4 strs)]
|
||||
[(str . strss) (apply apply string-append str strss)]))
|
||||
|
||||
(require (only-in racket/list add-between))
|
||||
|
||||
(define none (gensym))
|
||||
(require (only-in racket/list add-between)
|
||||
(only-in racket/unsafe/undefined [unsafe-undefined none]))
|
||||
|
||||
(define (string-join strs [sep " "]
|
||||
#:before-first [before-first none]
|
||||
|
|
Loading…
Reference in New Issue
Block a user