blob: a6d0d4b686c243bf537bd54e6cafd9562838283e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# coding=utf-8
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 = {}
|