The specific problem I’d like to solve is that I’d like to pass a “tile” to the drawing function.
The tile might be a polygon, or a path, or a rectangle, or maybe someday an image. I understand how to set attributes of an object using variables but I don’t know how to set a different underlying object which might have different attributes. So I might want my “tile” to be a rectangle with specific attributes, or a path with different attributes, but those objects have different attribute families.
Having said that, if you want to use wallpaper groups to generate tilings, I think you would get more idiomatic D3 code by using the group to generate data that describes the tiling (perhaps a list of transforms) and then using a construct like