From a854e2ed7f549698e721f37bb9d937145ef696cf Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 28 Mar 2018 22:10:33 -0700 Subject: [PATCH] add `for/splice` and `for*/splice` to docs --- pollen/private/ts.rktd | 2 +- pollen/scribblings/core.scrbl | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pollen/private/ts.rktd b/pollen/private/ts.rktd index c8f7954..7059b9c 100644 --- a/pollen/private/ts.rktd +++ b/pollen/private/ts.rktd @@ -1 +1 @@ -1522128018 +1522300233 diff --git a/pollen/scribblings/core.scrbl b/pollen/scribblings/core.scrbl index 38d9cac..7ef000b 100644 --- a/pollen/scribblings/core.scrbl +++ b/pollen/scribblings/core.scrbl @@ -13,7 +13,7 @@ These functions are automatically imported into every Pollen source file (meanin -@section{Syntactic forms} +@section{Metas} @defform[(define-meta name value)] Add @racket[_value] to the metas of the current document, using @racket[_name] as the key. @@ -22,6 +22,9 @@ You can retrieve a meta value — even in the same document where you define it For an introduction to metas, see @secref["Inserting_metas"]. + +@section{Splicing} + @defform[(\@ arg ...)] Splicing tag: signals that a list should be merged into its containing expression. You can use something other than @racket[\@] by overriding @racket[setup:splicing-tag]. @@ -33,7 +36,6 @@ doc ] - @defform[(when/splice condition pollen-args)] If @racket[_condition] is true, put the @racket[_pollen-args] into the document. Within a template file, usually invoked like so: @@ -44,6 +46,13 @@ The inserted text can contain its own nested Pollen commands. @racket[when/splice] can be more convenient than @racket[when], because @racket[when] will only use the last argument between the curly braces. @racket[when/splice], by contrast, treats everything between the curly braces as a block. +@deftogether[( +@defform[(for/splice (for-clause ...) body-or-break ... body)] +@defform[(for*/splice (for-clause ...) body-or-break ... body)])] +Like @racket[for/list] and @racket[for*/list], but the resulting list is spliced into the document. + + + @section{Data helpers} Functions for retrieving data out of Pollen source files. These are not the only options – you can, of course, use any of the usual Racket functions.