While working with lists of fixed length, I noted that type specification for such lists are conspicuously missing.  For example, the following does not work...<div><br></div><div><div><font face="'courier new', monospace">-spec get_buttons() -> {ok, [boolean(), boolean(), boolean(), boolean()]}.</font></div>
</div><div><br></div><div>Is there some sneaky way to make this go?  Now I know you would normally use a tuple in this situation, but I will be using the lists module to process this data so I want to stick with lists.</div>
<div><br></div><div>I would love to see something like this for list specification...</div><div><div><br></div><div><br></div><div><div><font face="'courier new', monospace">  List :: list(Type)                        %% Proper list ([]-terminated)</font></div>
<div><font face="'courier new', monospace">+       | list(Type, Length)                %% Proper list of fixed size</font></div><div><font face="'courier new', monospace">+       | tlist(TList)                      %% Proper list specified like a tuple</font></div>
<div><font face="'courier new', monospace">        | improper_list(Type1, Type2)       %% Type1=contents, Type2=termination</font></div><div><font face="'courier new', monospace">        | maybe_improper_list(Type1, Type2) %% Type1 and Type2 as above</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">  Tuple :: tuple()                          %% stands for a tuple of any size</font></div><div><font face="'courier new', monospace">        | {}</font></div>
<div><font face="'courier new', monospace">        | {TList}</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">  TList :: Type</font></div>
<div><font face="'courier new', monospace">        | Type, TList</font></div><div><br></div><div><br></div><div>Thanks,</div><div><span style="font-family:arial,helvetica,sans-serif">Dan.</span></div></div></div><div>
<span style="font-family:arial,helvetica,sans-serif"><br></span></div>