Map -spec in erlang -
i'm looking use new erlang maps in project, want make sure -spec do. question is, what's syntax this? there there records can specify field types? or use map() (and correct type spec?)
yes, map() 1 way specify map type. #{}, map() means map of size. can specify #{ type => type } 1 or more type => type pairs, described in erlang types , function specifications page. also, have @ can_pkt() type in source code maps1 test in erlang source code, specifies record-like map type.
Comments
Post a Comment