changeset 64:f6fce6a54e94

Remove unnecessary sort facts
author IBBoard <dev@ibboard.co.uk>
date Sat, 30 Sep 2017 15:29:00 +0100
parents e159ec90a072
children 69eb40c46798
files 3-Prolog/day2-self-study.pl
diffstat 1 files changed, 0 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/3-Prolog/day2-self-study.pl	Sat Sep 30 14:26:58 2017 +0100
+++ b/3-Prolog/day2-self-study.pl	Sat Sep 30 15:29:00 2017 +0100
@@ -16,8 +16,6 @@
 find_smallest([Head|Tail], Smallest) :- find_smallest([Head|Tail], Head, Smallest).
 
 % Sort a list
-insert_sort([], [], []).
-insert_sort([Head], [], [Head]).
 insert_sort([], Sorted, Sorted).
 insert_sort([UHead|UTail], [], Result) :- insert_sort(UTail, [UHead], Result).
 insert_sort([UHead|UTail], [SHead|STail], Result) :- UHead > SHead, insert_sort([UHead], STail, NewSTail), insert_sort(UTail, [SHead|NewSTail], Result).