summaryrefslogtreecommitdiff
path: root/prolog/problems/lists/len_2/common.py
blob: 62be9ccdc1df4ca15858d46ec603ca53ec428cd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
id = 119
group = 'lists'
number = 26
visible = True
facts = None

solution = '''\
len([], 0).
len([_|T], Len) :-
  len(T, LenT),
  Len is LenT + 1.
'''