Let's define a structure type
(struct onion (leek cut tears))
Now I'd like to construct a value of this type. I can say
(onion 1 2 4)
but if there are a lot of components it can become obscure which value goes with which field.
Is there some syntax that lets me provide keyword arguments to the constructor? Something like
onion cut: 3 tears: many leek: 1)
Of course his likely isn't the correct syntax .
But is there any way of getting keywords like this in a constructor -- without of course hand-coding a special-purpose function with keyword arguments for each structure type.
Of course there's struct-copy, but that requires I first make dummy version of the structure to modify, which seems wasteful.