> On Dec 8, 2018, at 5:15 AM, Fletcher Hardison <fhardi...@gmail.com> wrote:
> 
> I've been doing something like:
> 
> (define (my-tag . xs)
>    (case (current-poly-target)
>        [(ltx) do something] 
>        [else xs]))
> 
> Is there a better way to pass elements through without doing anything to 
> them. I'm finding that my current method oftens wraps the xs in a list when 
> returned which then messes up further functions txexpr? contracts.


Wrap the elements in the splice tag @ and they will be merged with the 
surrounding X-expression:

(define (my-tag . xs)
   (case (current-poly-target)
       [(ltx) 'do-something] 
       [else `(@ ,@xs)]))

(In this case the first `@` represents the splice tag and the second `@` is the 
quasiquote unsplicing operator)

See also:
https://groups.google.com/d/msg/pollenpub/3zZ_dwMbqdI/fandociXAwAJ

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to