Skip to content

add_vertex! should return the added vertex. #122

Open
@chelate

Description

@chelate

So I often write code like

add_vertex!(tree) # returns "true" for some reason ???
v = last(vertices(tree))
...

wouldn't it be great if add_vertex! returned something useful, and guaranteed to be the fresh vertex added, instead of a boolean that I can't imagine a use for? PROPOSAL

v = add_vertex!(tree) #new vertex is the return value!

Let me know if I'm missing something. If people love that boolean (Why???) we can always pass it as the first argument but on the whole this would just be way better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions