example/src/features/generators.js
function make(array) {
  // Leaf node:
  if (array.length == 1) return new Tree(null, array[0], null);
  return new Tree(make(array[0]), array[1], make(array[2]));
}
function make(array) {
  // Leaf node:
  if (array.length == 1) return new Tree(null, array[0], null);
  return new Tree(make(array[0]), array[1], make(array[2]));
}
function make ( array ) { // Leaf node: if ( array . length == 1 ) return new Tree ( null , array [ 0 ] , null ) ; return new Tree ( make ( array [ 0 ] ) , array [ 1 ] , make ( array [ 2 ] ) ) ; }
Make a tree
Make a tree