From af3f676683f5e81a3b56a0f78f351cc0dec5b542 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adri=C3=A1n=20Arroyo=20Calle?= Date: Fri, 7 Jan 2022 19:28:07 +0100 Subject: [PATCH] Minor fixes --- src/lib/ugraphs.pl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/ugraphs.pl b/src/lib/ugraphs.pl index 257d4e01..159f4c00 100644 --- a/src/lib/ugraphs.pl +++ b/src/lib/ugraphs.pl @@ -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: J.Wielemaker@vu.nl 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), -- 2.54.0