From 372f3d795e28f3e5f1ef2c41a522f2e736e4be11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Thu, 22 Mar 2012 22:41:41 +0000 Subject: [PATCH] fix bad use of skip_list. --- pl/sort.yap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pl/sort.yap b/pl/sort.yap index 5b09c4379..e6c72ddd8 100644 --- a/pl/sort.yap +++ b/pl/sort.yap @@ -54,7 +54,7 @@ length(L, M) :- M is N + 1, NL = [_|L], '$$_length2'(L, O, M) ). sort(L,O) :- - '$skip_list'(L,NL,RL), + '$skip_list'(NL,L,RL), ( RL == [] -> true ; var(RL) -> '$do_error'(instantiation_error,sort(L,O)) ; '$do_error'(type_error(list,L),sort(L,O)) @@ -67,7 +67,7 @@ sort(L,O) :- -> L == [] ; - '$skip_list'(O,NO,RO), + '$skip_list'(NO,O,RO), ( RO == [] -> NO =< NL ; var(RO) -> NO =< NL ; '$do_error'(type_error(list,O),sort(L,O))