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

id = 119
number = 26
visible = True
facts = None

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