Skip to content

Instantly share code, notes, and snippets.

@yurrriq
Last active September 25, 2015 22:53
Show Gist options
  • Select an option

  • Save yurrriq/15b63edc673df2e883f6 to your computer and use it in GitHub Desktop.

Select an option

Save yurrriq/15b63edc673df2e883f6 to your computer and use it in GitHub Desktop.
Erlang map literal syntax
%% I can't seem to commit the map literal syntax to memory,
%% so I'm making this gist.
Map = #{testing => 123,
cool => true,
heterogeneous => [<<"You">>, "know", it]}.
%% => #{cool=>true,heterogeneous=>[<<89,111,117>>,[107,110,111,119],it],testing=>123}
is_map(Map).
%% => true
maps:get(cool, Map).
%% true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment