better implementation of list_si/1
Per discussion in https://github.com/mthom/scryer-prolog/pull/1589.
This commit is contained in:
@@ -43,9 +43,15 @@ integer_si(I) :-
|
|||||||
atomic_si(AC) :-
|
atomic_si(AC) :-
|
||||||
functor(AC,_,0).
|
functor(AC,_,0).
|
||||||
|
|
||||||
list_si(L) :-
|
% list_si(L) :-
|
||||||
\+ \+ length(L, _),
|
% \+ \+ length(L, _),
|
||||||
sort(L, _).
|
% sort(L, _).
|
||||||
|
|
||||||
|
list_si(L0) :-
|
||||||
|
'$skip_max_list'(_,_, L0,L),
|
||||||
|
( nonvar(L) -> L = []
|
||||||
|
; throw(error(instantiation_error, list_si/1))
|
||||||
|
).
|
||||||
|
|
||||||
chars_si(Cs) :-
|
chars_si(Cs) :-
|
||||||
list_si(Cs),
|
list_si(Cs),
|
||||||
|
|||||||
Reference in New Issue
Block a user