[erlang-questions] How to math list of record

Sergey Safarov s.safarov@REDACTED
Tue Dec 13 10:20:10 CET 2016


I want check type of passed arguments. In following example i can check
record type

-record(person, {first_name, last_name}).
my_func(#person{} = Arg) -> Arg.

It works.
But how to do check of list of records? Like this

-record(person, {first_name, last_name}).
my_func([#person{} | ... ] = Arg) -> Arg.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161213/3fdfc256/attachment.htm>


More information about the erlang-questions mailing list