summaryrefslogtreecommitdiff
path: root/prolog/problems/trees/tolistbt_2/common.py
blob: c9765df794c9b602c87b68204f00f260be3ea512 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# coding=utf-8

id = 141
group = 'trees'
number = 46
visible = True
facts = None

solution = '''\
conc141([], L, L).
conc141([H|T], L2, [H|L]) :-
  conc141(T, L2, L).

tolistBT(nil, []).
tolistBT(b(L, E, R), List) :-
  tolistBT(L, LL),
  tolistBT(R, RL),
  conc141(LL, [E|RL], List).
'''