summaryrefslogtreecommitdiff
path: root/prolog/problems/trees/tolistbt_2/en.py
blob: e67fffbdbf035649baf0830fa854dbbe95810738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# coding=utf-8

id = 141
name = 'tolistBT/2'
slug = 'construct a list with all elements of a binary tree'

description = '''\
<p><code>tolistBT(T, L)</code>: the list <code>L</code> contains all the elements in the binary tree <code>T</code>, in infix order.</p>
<pre>
  ?- tolistBT(b(b(nil,2,nil),1,b(nil,3,nil)), L).
    L = [2,1,3].
</pre>'''

hint = {}