aysylu / loom

Graph library for Clojure. Mailing list https://groups.google.com/forum/#!forum/loom-clj
http://aysy.lu/loom/
886 stars 108 forks source link

Support empty maps #127

Open nibe opened 4 years ago

nibe commented 4 years ago

Before:

(loom.graph/graph {})
Execution error (NullPointerException) at loom.graph/build-graph$build (graph.cljc:499).
null

After:

(loom.graph/graph {})
=> #loom.graph.BasicEditableGraph{:nodeset #{}, :adj {}}

Of course you could call (loom.graph/graph) instead but the point is to remove a pitfall when dealing with maps.