Search in record list

Bengt Kleberg bengt.kleberg@REDACTED
Fri Mar 17 15:43:59 CET 2006


On 2006-03-17 15:31, Ola Andersson A (AL/EAB) wrote:
> Isn't that like cheating a bit?
> Using the fact that records are tuples.

i do not think so. records are documented as beeing tuples. it is 
neccessary to know this to avoid (among others) the following:

-record( rec, {a} ).

a( T ) when is_tuple(T) -> tuple;
a( R ) when is_record(R, rec) -> record.

a( #rec{} ) => tuple


bengt



More information about the erlang-questions mailing list