Looks good to me! On Monday, April 29, 2019 at 9:06:53 PM UTC+2, wanderley...@gmail.com wrote:
> [(_ name (~var e element-exp) ...) > Here you can replace the `~var` call with the more classic form `e:element-exp`. `~var` is only required when you want to pass arguments to the class (which, as I was saying, is rare, I discovered it not so long ago). > I am amused by the > power of `...` in templates. > It's definitely powerful! The way `...` works (I'm not gonna explain that right so take it with a pinch of salt) is by examining the previous expression and trying to find syntax bindings inside that expression that have a "depth" and repeat them. So for example, if you bind a syntax attribute with `#'(element ...)`, you give `#'element` a depth of 1 (basic bindings without ellipsis have a depth of 0). If you create a binding inside an ellipsis bound form, you nest it one level of depth further: `((element ...) ...)` has depth 2. If you try using a syntax binding with depth > 0 without attaching `...` somewhere at the end, the macro will crash saying that the ellipsis is missing. So basically, you are free to put `...` anywhere as long a the expression just before contains syntax bindings with the right levels of depth. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.