You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
length/2 no longer loops on a partial list with too many elements for a bound length, such as length([_|L], 0), or with a length that is not a non-negative integer: it fails, or raises type_error(integer, N) or domain_error(not_less_than_zero, N), checking the length before
the list, as the ISO conformity table for length/2 has it. A cyclic list fails rather than
looping, and length(L, L), which has no finite answer, raises resource_error(finite_memory).
A closed list or a bound length still answers without leaving a choice point.