[erlang-questions] maps and lager: how to handle new type gracefully?
Loïc Hoguin
essen@REDACTED
Tue Apr 29 14:20:43 CEST 2014
erlang:function_exported(erlang, is_map, 1) can tell you if it exists
before you try to call it.
On 04/29/2014 02:17 PM, Max Lapshin wrote:
>
>
>
> On Tue, Apr 29, 2014 at 4:09 PM, Loïc Hoguin <essen@REDACTED
> <mailto:essen@REDACTED>> wrote:
>
> If you use the fully qualified erlang:is_map(Var) and
> map:to_list(Var) you can easily handle maps in a backward compatible
> way.
>
>
> But erlang:is_map(Var) will fail on R16 with undef
--
Loïc Hoguin
http://ninenines.eu
More information about the erlang-questions
mailing list