From 5733b102f3ee38d3af9a33886381f0721eaf585a Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 16 Mar 2018 16:15:40 -0700 Subject: [PATCH] add `for/splice` --- pollen/core.rkt | 7 +++++++ pollen/private/ts.rktd | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pollen/core.rkt b/pollen/core.rkt index 3a2208a..4e0d191 100644 --- a/pollen/core.rkt +++ b/pollen/core.rkt @@ -126,6 +126,13 @@ (SPLICING-TAG)))])) +(provide for/splice) +(define-syntax (for/splice stx) + (syntax-case stx () + [(_ ([ID SEQ] ...) . BODY) + #'(when/splice #t (for/list ([ID SEQ] ...) + (when/splice #t . BODY)))])) + (provide when/block) ; bw compat (define-syntax-rule (when/block cond body ...) (when/splice cond body ...)) diff --git a/pollen/private/ts.rktd b/pollen/private/ts.rktd index b44846e..337d289 100644 --- a/pollen/private/ts.rktd +++ b/pollen/private/ts.rktd @@ -1 +1 @@ -1521073365 +1521242140