I’d like to extend the syntax for list literals to have something where the representation would match closely to what append(ListOfLists, List)
accepts as ListOfLists
as the representation of List
.
I might consider macros, or term_expansion, but the trouble is that my literal might be nested within lists, or as a DCG goal, or in a list of a DCG goal … etc.
So, I either need to take context into account in a way that isn’t clear to me, or use some way of rewriting that avoids issues.
Any suggestions as to what I should look into?