diff --git a/list.rkt b/list.rkt index 46afbf9..c85afd0 100644 --- a/list.rkt +++ b/list.rkt @@ -123,16 +123,6 @@ result)) -;; for use inside quasiquote -;; instead of ,(when ...) use ,@(when/splice ...) -;; to avoid voids -(provide+safe when/splice) -(define-syntax (when/splice stx) - (syntax-case stx () - [(_ test body) - #'(if test (list body) '())])) - - (provide+safe values->list) (define-syntax (values->list stx) (syntax-case stx () diff --git a/scribblings/list.scrbl b/scribblings/list.scrbl index 651e689..5b38ab3 100644 --- a/scribblings/list.scrbl +++ b/scribblings/list.scrbl @@ -132,15 +132,6 @@ Same as @racket[members-unique?], but if the members are not unique, raises a de (members-unique?/error '(a b c d e f a b)) ] -@defform[(when/splice test expr)] -A special version of @racket[when] that you can use inside @racket[quasiquote] to suppress @racket[void] values when @racket[_test] is @racket[#f]. As the name suggests, it works in conjunction with the @litchar["@"] splicing operator. - -@examples[#:eval my-eval -`(,(when (even? 2) "hooray")) -`(,(when (even? 3) "hooray")) -`(,@(when/splice (even? 2) "hooray")) -`(,@(when/splice (even? 3) "hooray")) -] @defform[(values->list values)] Convert @racket[_values] to a simple list.