Skip to content

Instantly share code, notes, and snippets.

@sa2ajj
Created May 26, 2011 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sa2ajj/993823 to your computer and use it in GitHub Desktop.
Save sa2ajj/993823 to your computer and use it in GitHub Desktop.
strange error
Erlang R14A (erts-5.8) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.8 (abort with ^G)
1> P = [{filename,"Filename"},
1> {maintainer,"Maintainer"},
1> {description,"Description"},
1> {package,"Package"},
1> {section,"Section"},
1> {'installed-size',"Installed-Size"},
1> {priority,"Priority"},
1> {suggests,"Suggests"},
1> {depends,"Depends"},
1> {version,"Version"},
1> {source,"Source"},
1> {architecture,"Architecture"}].
[{filename,"Filename"},
{maintainer,"Maintainer"},
{description,"Description"},
{package,"Package"},
{section,"Section"},
{'installed-size',"Installed-Size"},
{priority,"Priority"},
{suggests,"Suggests"},
{depends,"Depends"},
{version,"Version"},
{source,"Source"},
{architecture,"Architecture"}]
2> T = gb_trees:from_orddict(P).
{12,
{priority,"Priority",
{package,"Package",
{maintainer,"Maintainer",
{filename,"Filename",nil,nil},
{description,"Description",nil,nil}},
{'installed-size',"Installed-Size",
{section,"Section",nil,nil},
nil}},
{version,"Version",
{depends,"Depends",{suggests,"Suggests",nil,nil},nil},
{architecture,"Architecture",
{source,"Source",nil,nil},
nil}}}}
3> gb_trees:get(description, T).
** exception error: no function clause matching gb_trees:get_1(description,nil)
4> gb_trees:lookup(description, T).
none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment