]> Repositorios git - scryer-prolog.git/commitdiff
Minor fixes
authorAdrián Arroyo Calle <[email protected]>
Fri, 7 Jan 2022 18:28:07 +0000 (19:28 +0100)
committerAdrián Arroyo Calle <[email protected]>
Fri, 7 Jan 2022 18:28:07 +0000 (19:28 +0100)
src/lib/ugraphs.pl

index 257d4e01f79e8f54172915d14488f99fbab43e41..159f4c00d9c0032986eb02acf4a5b24b0ae1e0f9 100644 (file)
@@ -1,6 +1,4 @@
-/*  Part of SWI-Prolog
-
-    Author:        R.A.O'Keefe, Vitor Santos Costa, Jan Wielemaker
+/*  Author:        R.A.O'Keefe, Vitor Santos Costa, Jan Wielemaker
     E-mail:        [email protected]
     WWW:           http://www.swi-prolog.org
     Copyright (c)  1984-2021, VU University Amsterdam
@@ -133,12 +131,10 @@ vertices_edges_to_ugraph(Vertices, Edges, Graph) :-
 
 % replace with real msort/2 when available
 msort_(List, Sorted) :-
-    maplist(item_pair, List, Pairs),
+    pairs_keys(Pairs, List),
     keysort(Pairs, SortedPairs),
     pairs_keys(SortedPairs, Sorted).
 
-item_pair(X, X-X).
-
 add_vertices(Graph, Vertices, NewGraph) :-
     % msort/2 not available in Scryer Prolog yet: msort(Vertices, V1),
     msort_(Vertices, V1),