summaryrefslogtreecommitdiff
path: root/prolog/problems/lists/min_2/common.py
blob: cc6ad9e22335461deda9c64fce407ee4bbb16297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# coding=utf-8

id = 108
number = 15
visible = True
facts = None

solution = '''\
min([X], X).
min([H|T], Min):-
  min(T, Min1),
  ( H < Min1, Min is H
    ;
    H >= Min1, Min is Min1 ).
'''