[erlang-questions] Are recursive record definitions allowed?

Tony Arcieri tony.arcieri@REDACTED
Wed Jul 28 19:39:52 CEST 2010


On Tue, Jul 27, 2010 at 1:28 PM, Brian Williams <mixolyde@REDACTED> wrote:

> I'm working on some algorithm analysis and am trying to define a
> fairly simple binary search tree with a record definition:
> -record(btreenode, {left = #btreenode{}, right = #btreenode{}, value}).


Wouldn't you want the defaults to be for the leaf nodes, and if so,
shouldn't they be some sort of nil/null/void atom to indicate there are no
left/right branches?

-- 
Tony Arcieri
Medioh! A Kudelski Brand


More information about the erlang-questions mailing list