Which is obviously incorrect syntax, and it is easy to see why from the template of course. This would require an extra type or two, which I would have called GraphAttribute, NodeAttribute, etc. But of course these functional options names have been taken. Perhaps just:
WithDefaults("graph", "[x=y, b=c, ...]"
This seems like a fairly easy thing to implement and is preferable to having to add attributes to every individual node and edge.
It is often convenient to give some default options for graph, nodes and edges, as in:
But as things stand, this cannot be achieved. If you try and "fool" it, as so:
Then you get:
Which is obviously incorrect syntax, and it is easy to see why from the template of course. This would require an extra type or two, which I would have called GraphAttribute, NodeAttribute, etc. But of course these functional options names have been taken. Perhaps just:
This seems like a fairly easy thing to implement and is preferable to having to add attributes to every individual node and edge.