Skip to content

Does the implementation of other-direction need to call edge-description->edge ? #57

@jafingerhut

Description

@jafingerhut

The implementation of function other-direction first checks whether the edge argument returns true for (undirected-edge? edge), returning nil immediately if it returns false. The only values for which undirected-edge? returns true, at least in the current implementation, are UndirectedEdge objects, for which edge-description->edge will always return its argument.

It seems this is at most a small performance degradation, and that not calling edge-description->edge would leave function other-direction doing exactly what it does now, but slightly faster.

Then again, I may be missing some case where it is useful to call edge-description->edge from other-direction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions