Record comprehension
Martin Logan
martin@REDACTED
Wed Jul 12 23:36:19 CEST 2000
I seem to have encountered somthing interesting with records. If anyone
has any insight please share.
-module(test).
-export([test/0]).
-record(tester, {first, second, third}).
test() ->
H = {first, second, third},
R = #tester{first=first, second=second, third=third},
{H#tester.second, R#tester.second}.
OUTPUT:
32> c(test).
{ok,test}
33> test:test().
{third,second}
Thanks,
Martin Logan
More information about the erlang-questions
mailing list