How to implement breadth first search in Scala with FP
|Added at||2016-12-27 15:12|
I'm wondering how to implement a Breadth-first search in Scala, using functional programing.
Here is my first, impure, code :
Although I use only local mutability (a
I come up with another version :
Is there a better way for both solutions ? Is it possible to use cats/scalaz to remove some boilerplate ?