Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -module(demo).
- -export([print/0]).
- -record(magic_record, {
- alpha = 1,
- beta = b,
- gamma = [x, y, z],
- psy,
- omega = "done"
- }).
- -define(pp(Rec, Name), io_lib_pretty:print(Rec, fun(_, _) -> record_info(fields, Name) end)).
- print() ->
- R = #magic_record{},
- io:format("~s~n", [?pp(R, magic_record)]).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement