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:
Gustavo Massaccesi 2018-05-17 23:33:26 -03:00
parent fd149ca1c0
commit b9392b2a51

View File

@ -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]