summaryrefslogtreecommitdiff
path: root/prolog/smallest.pl
blob: 1a8835b7842157c025e8fd6d519b68c5a9304fb5 (plain) (blame)
1
2
3
4
smallest([H], H).
smallest([H|T], S) :-
	smallest(T, E),
	(H<E -> S is H; S is E).