Logo

Programming-Idioms

History of Idiom 17 > diff from v44 to v45

Edit summary for version 45 by nopeslide:
New Erlang implementation by user [nopeslide]

Version 44

2019-09-27, 22:18:43

Version 45

2019-09-29, 15:14:48

Idiom #17 Create a Tree data structure

The structure must be recursive. A node may have zero or more children. A node has access to children nodes, but not to its parent.

Idiom #17 Create a Tree data structure

The structure must be recursive. A node may have zero or more children. A node has access to children nodes, but not to its parent.

Code
-record( node,{
	value         :: any(),
	children = [] :: [node#{}]
}).
Doc URL
http://erlang.org/doc/reference_manual/data_types.html#record