?- length(L,25).
L = [_G245, _G248, _G251, _G254, _G257, _G260, _G263, _G266, _G
269|...].
If I use write(L) following the length predicate then the interpreter prints the list twice, one expanded and the other not.
?- length(L,25).
L = [_G245, _G248, _G251, _G254, _G257, _G260, _G263, _G266, _G
269|...].
If I use write(L) following the length predicate then the interpreter prints the list twice, one expanded and the other not.
There is a limit on the depth to prevent too long output. You can change it with set_prolog_flag/1.
Edit: You can also remove the limit completely by removing it from the options list.