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

tolistBT(T, L): the list L contains all the elements in the binary tree T, in infix order.

?- tolistBT(b(b(nil,2,nil),1,b(nil,3,nil)), L).
  L = [2,1,3].
''' hint = {}