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

id = 111
number = 18
visible = True
facts = None

solution = '''\
conc111([], L, L).
conc111([H|T], L2, [H|L]) :-
  conc111(T, L2, L).
rev([], []).
rev([H|T], R):-
  rev(T, R1),
  conc111(R1, [H], R).
'''