Question about records

Fredrik Linder <>
Wed Dec 22 13:55:48 CET 2004


Hi

I hope this makes it clearer:

With

-record(a, {b, c}).

1> A1 = #a{}.
{a, undefined, undefined}.
2> A1#a.b.
undefined.
3> A1#A.c.
undefined.
4> A2 = #a{b = 1}.
{a, 1, undefined}.
5> A2#a.b.
1
6> lists:foldl(fun(A, Acc) -> Acc end, #a{}, [1]).
[{a, undefined, undefined}].

Merry Christmas
/Fredrik

> -----Original Message-----
> From: 
> [mailto:]On Behalf Of Dietmar Admin
> Schaefer
> Sent: den 22 december 2004 13:27
> To: 'Erlang Questions List'
> Subject: Question about records
> 
> 
> Hi !
> 
> 
> I have:
> 
> -record(cmmc_config,{...}).
> 
> 
> after reading the docs (more or less carefully) it's not yet 
> clear to me
> 
> 
> what   lists:foldl(F, #cmmc_config{}, Lines) means.
> (#cmmc_config{} is the point)
> 
> 
> regards
> 
> 
> 
> Dietmar
> 



More information about the erlang-questions mailing list