Hi, why does the first version below work without a choicepoint as intended, whereas the 2nd version has an unwanted choicepoint on e_weird?
I’m using SWI-Prolog version 8.5.10
atomic_list_concat([1, 0], '-', Arg),
Arg = 1-0,
The first one is handled reliably using first argument indexing. The second should be handled using the JIT indexing, but this only triggers if there are sufficient clauses (I think >= 16 by default). In theory it should make a “deep index” on (-)/2 and then it might make a multi-argument index on the first two arguments (depending on the value distribution). This results in a combined hash that can be subject to hash collisions and determinism is thus not guaranteed.