haskell / fgl

A Functional Graph Library for Haskell
http://hackage.haskell.org/package/fgl
Other
184 stars 54 forks source link

#52 allow pre' for bfs + xbfsWith #95

Closed ciez closed 3 years ago

ciez commented 4 years ago

xdfsWith allows to specify suc' or pre' when performing the search. This allows to search in links as well as out links.

bfs is currently only possible with hard coded suc' : out links.

the suggested changes add an arg to bfsnInternal. This arg allows to pass suc' or pre' to bfs to search in-links as well as out-links.

current functions' signatures remain unchanged.

2 new functions are added: xbfsWith xbfsnWith

added documentation to all the related functions