Only when you are using a pure functional language it becomes non trivial to combine the results of the individual sub branches.
Only when you are using a pure functional language it becomes non trivial to combine the results of the individual sub branches.
If all you want is to take some kind of search function or backtracking system that generates a stream of results then combining the sub branches is trivial. If you represent a stream as a list and use something like Haskell that is lazy, then all you have to do is literally combine the streams.
myStreamGenerator1 p1 ++ myStreamGenerator2 p2
if you want a different search strategy you can intersperse.
concat . intersperse (mySG1 p1) (mySG2 p2)
the cases being DFS and BFS
So you cannot simply concatenate the results of the subbranches, each new branch needs to be aware of what has been found so far. That can quickly become ugly in pure FP, that's why people have been looking for solutions that do that in an elegant way, e.g. using Monads.
If you want some kind of global state of the current results then you just pass around the current calculated states. Pure FP has many simple solutions for passing around state.