Named singleton variables

Hi!

I’d like to know if there’s some way to detect Named singleton variables (i.e. variables starting with a double underscore (__) or a single underscore followed by an uppercase letter, e.g., __var or _Var, Section 2.15.1.10 of the manual).

I’ve seen read_term can inform the list of singleton variables but that’s not exactly what I’m looking for. For example in:

append([1,2,3],[a,b,c],_U), append(_U,[[b,1],[s,6]],A).

_U is a named singleton variable but it is not a singleton variable.

Thanks for the help.

Cheers!

That’s exactly why I want access to those variables. I can write a piece of code based on variable_names but I thought there would some standard predicate doing the job.

Good to know. Thanks!

Thanks. Fixed (commit 8d9b23a2ee5858af086dd70601dc452a7f85bf19)

That is a nice opportunity to create your first PR :slight_smile: And yes, I agree the text is now a bit awkward, so I’ll accept an improved version …