
-module(extype).

% -type tree() :: {'node', tree(), tree(), any(), any()}.
%-type tree() :: {'node', Left::tree(), Right::tree(), Key::any(), Value::any()}.

-record(man, {name="" :: string(),
               notes :: tree(),
               age :: non_neg_integer(),
               friends=[] :: [#man{}], % #user{}
               bio :: string() | binary()}).


-type tree() :: {'node', 'nil'} | {'node', Key::any(), Val::any(), Left::tree(), Right::tree()}.
