I am writing a program in erlang and I created this record: -record(tree, {node, left, right}). I want to print a list of different trees, and this is how prints it: [{tree,x1,{x3,0,1},{tree,x2,1,{x3,0,1}}}, {tree,x1,{tree,x3,0,1},{tree,x3,{x2,1,0},1}}] Is there an easy to print it without the word “tree”? (the name of the record). Sure I can just define it […]
Categories
Erlang records printing
- Post author By Full Stack
- Post date May 4, 2020
- No Comments on Erlang records printing
- Tags "x3"], 0, 1, 1}}] Is there an easy to print it without the word "tree"? (the name of the record). Sure I can just define it as a tuple and not a record, and this is how prints it: [{tree, but I want to try to work with a record so the code will be more organized., I am writing a program in erlang and I created this record: -record(tree, left, node, right}). I want to print a list of different trees, tree: {}, x1, x2