Lack of examples is perceived as biggest problem with the SWI-Prolog documentation. Writing examples is a lot of work and the same example is often relevant to multiple predicates. I’ve added a feature to the website to manage examples outside the manual and have them automatically appearing with all the predicates they use and refer to.
See e.g. append/2 or assert/1.
The examples themselves are for now in a git repository, where the README roughly explains how it works.
As is, changes to the repository reach the backends within 5 minutes and the CDN in one hour. Note that you can simply add and edit files on GitHub and thus we can give people the authority to add examples directly.
Please share your opinion. Would this work? What can be improved? What procedure do we need to ensure good examples? Can we write a guide as to what a good example is?
Please do not start making zillions of PRs before this infrastructure is stable. Notably using a Discourse wiki category might be an option to simply discussion around examples.