Are recursive record definitions allowed?

Brian Williams <>
Tue Jul 27 21:28:57 CEST 2010


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}).
I get:
record btreenode undefined

Should I just not bother to specify the type of left and right and
just enforce the record type in code?


-- 
Brian E. Williams

http://www.techhouse.us/wordpress-mu/brianw

"Never attribute to malice that which can be adequately
explained by stupidity." - Hanlon's Razor


More information about the erlang-questions mailing list